Sidebar Google ad content … Creating if/else statement

Posted in: Newspaper
Post count: 27

Hello tagdiv support,

I have a question I hope you can help me with… or at least point me in the right direction 🙂
We have ad code (Google Ad Manager code) we currently place in Posts. However, we’d like to NOT show the ads if the posts belongs to a particular Category. And I’m wondering if the best way to do that is to create a Shortcode(s) to create the if/else statement and check for a particular Category.

Just fyi – the plugin that adds the GAM ads in the middle of Posts is “Ad Inserter”.

Any feedback would be greatly appreciated!!

Sample Post :
https://mexiconewsdaily.com/branded/stay-at-this-jewel-of-a-hotel-in-the-heart-of-san-miguel-de-allende/

Thank you,
Tim Roman

Post count: 27744

Hello Tim,

What can be done in this situation is to duplicate the single post template – https://i.imgur.com/CcSRl2u.png and remove from the duplicate template the inline ads, after set it to be used for that category – https://i.imgur.com/BblKmtc.png

I hope this will help you!

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.