Support » Plugin: AdRotate Banner Manager » Target ads for tags instead of categories

  • Resolved Fredrik Hed


    Today I can use AdRotate to target ads for specific categories. Is it also possible to do this for tags?

    I have few categories, but many tags so being able to target ads for tags would suit my needs much better.

    You can see an example here.


    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Arnan de Gans


    As a feature that’s currently not available in AdRotate (Pro).
    I’ve experimented with that, but it was a messy affair – I couldn’t get the UI right.

    Having said that, if you know a bit of code you can make a filter/function for it yourself.
    Take a look at the is_tag and has_tag functions in WordPress.

    Your code could look like something like this:

    if(has_tag(’slug’)) echo adrotate_group(1);

    Stick code like that in your theme where you need it and you should be good.
    If you use groups you can then manage the actual adverts from the dashboard without touching the code afterwards.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.