• Resolved Rodrigo

    (@vejapixel)


    Hi Arnan, how are you?

    I need to remove the Adsense code in some pages (pages, posts, categories, tag pages, …) with content on Gambling, because here in Brazil this is prohibited and therefore Adsense does not allow.

    So I was wondering if the Adrotate plugin allows ad removal for only a few pages?

    I thank you.
    Rodrigo

Viewing 6 replies - 1 through 6 (of 6 total)
  • I do not think that AdRotate can do this. I think that you will have to hide or exclude the widgets on those pages.

    You could do it by CSS but that might record the ads as viewed.
    Maybe something like this will work:

    .category-gambling .adrotate_widgets { display: none; }
    .category-gambling .a-single { display: none; }
    Thread Starter Rodrigo

    (@vejapixel)

    Hello daymobrew, thanks for the feedback.

    I installed the Advanced Ads plugin to do this removal job. But as I already have ad groups created with Adrotate and distributed on my site then I just wanted to create an ad block in Advanced Ads, generate a shortcode and insert into an ad unit in Adrotate.

    And that’s what I did, but it looks like Adrotate can not read third-party shortcode.

    Is it possible for me to do what I’m trying to do (create ad in Advanced Ads and insert a code in Adrotate)?

    I thank you.
    Rodrigo

    Hi vejapixel,

    Thomas, the developer of the mentioned Advanced Ads plugin here.

    Would the other way around work with AdRotate being used in Advanced Ads? Our Rich Content ad type supports all shortcodes.

    Thomas

    Thread Starter Rodrigo

    (@vejapixel)

    Hi Thomas,

    So instead of putting the ad code in Advanced Ads, I put it in Adrotate.

    Then I collect the shortcode generated by Adrotate and insert it into a block of Advanced Ads.

    And finally I create the conditions in this block Advanced Ads not to appear the ad in certain pages of my site.

    Great. But, I put what code from my site, Adrotate or Advanced Ads?

    It is my intention to keep the Adrotate ad groups that are already inserted in my site.
    Just as you may already know … in each Adrotate ad group, you can have multiple ads. And in one of those ads (Adsense) I do not want it to appear on certain pages.

    In this scheme that I desire, there is no way?

    Hi Rodrigo,

    you can also have multiple ads in a group with Advanced Ads and only have some of them with a specific page condition.

    Anyway, if you keep your ads with adrotate and put the shortcode from adrotate into an Advanced Ads ad then you need to use the shortcode from Advanced Ads to display the ads.

    When I understand correctly now then you want to keep the adrotate placements as well. That is not possible because of the original problem you reported here.

    Thomas

    Plugin Author Arnan

    (@adegans)

    You can use post injection for most of what you’re trying to do: https://ajdg.solutions/manuals/adrotate-manuals/configure-adblockers-for-your-own-website/

    If you want more advanced control over your advert placement you can use PHP code (provided when editing groups and adverts) and use WordPress Conditional Tags to filter things where you want ’em. There’s a ton of tags, suitable for most situations.
    Take a look at https://codex.wordpress.org/Conditional_Tags

    Then with some basic PHP you can show or hide things on your site (this works for other things than AdRotate too as it’s just PHP).
    For example to show group 2 only on page id 12:
    if(is_page(12)) echo adrotate_group(2);

    Or specifically hide it on post id 2:
    if(!is_single(2)) echo adrotate_group(2);
    (Note the !, which basically equals ‘is-not’ or ‘anything but’)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Removing ads on specific pages’ is closed to new replies.