How to display ads ONLY if the tag / category setup is a match

I would like to identify a work-around for a problem I am having, or to confirm that I understand a behavior about in-post ads:

Here is what I am looking for:

– I would like for ads to display ads ONLY if the tag / category setup is a match.

– When there is no category or tag match with the ad category, I would like to NOT DISPLAY ANY ads.

The current behavior seems to be that even if there is NO MATCH, a randomly selected ad is DISPLAYED ANYHOW.

Is the only way to prevent ANY ads from showing up on a post to turn off the display of ads for each blog post individually, using the “Show Post Metabox”?

So for 300+ blog post site, this means the only way I can associate ads with relevant content, is to go in and manually edit all blog posts where I want to suppress ads, using the “meta post box”.

How can I achieve what I’d like to do here, which is to ONLY DISPLAY ADS when the category or tags of the post are setup to match the ad category, and suppress them otherwise?

  • Juergen
    • WPMU DEV Initiate

    I actually think I figured out a work-around to my issue:

    The trick seems to be that there MUST be a matching post and ad category, but if the ad category has no ads in it, no ads will display.

    So in order to force create matches, I created an ad category “DO NOT DISPLAY”, and am matching this against most existing post categories like “Blog” and “Uncategorized”. This creates a default condition of suppressing ads, unless BOTH a matching category and matching ads are found.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.