Banner after post title

Trouble updating AdRotate Professional to the latest version?

If your license is not expired and you are having trouble with updates for AdRotate Professional I want to hear from you!
Known issues; The update will not install or no update is visible in your dashboard.
Affected versions; Most versions of AdRotate Professional since December 2019.

Click here for the solution - AdRotate Pro update not working or not offered.

Home Forums AdRotate for WordPress Adverts and Banners Banner after post title

  • #102996


    I need to insert a group of banners under the title of each post.
    In the banner group settings it is not possible to “inject” the banner under the title of all posts, before the image of the post.
    I also need to make different banners visible for some categories.
    AdRotate GROUP is visible in every post after the title.
    AdRotate1 is linked to AdRotate GROUP, and is visible after the title for categories 1 and category 2.
    AdRotate2 is linked to AdRotate GROUP, and is visible after the title ONLY for category 2 (rotating with the AdRotate1 banner).

    I inserted the AdRotate group code php in my theme, after the title of each post. The groupo banner is displayed correctly. But how do I display different banners for categories 1 and 2?
    I await your support.

    PS. the version of AdRotate on my site is 5.8.2


    Arnan de Gans

    You can probably do that with 2 groups and Post Injection.
    Or if you want a lot more control on what happens create a filter for it in your theme.

    For example in single.php something like;

    if(is_category(array(1,2)) { echo adrotate_group(1); }
    else if(is_category(2) { echo adrotate_group(2); }
    else { echo adrotate_group(3); }

    Place this directly below the title on a new line.
    Learn more about is_category and many other handy filters here:
    The groups 1, 2 and 3 are of-course the IDs from the group. This can be any number, as long as the ID exists in AdRotate.

    If you’re editing files, always use groups. Then you can manage your adverts from the dashboard without having to edit files over and over again.
    Keep in mind that theme edits are overwritten with updates. To help prevent that, use a Child theme;

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Banner after post title’ is closed to new replies.

You may be interested in