Forums

Category/Tag Specific Ad Serving? (4 posts)

  1. nickaster
    Member
    Posted 5 months ago #

    Tying to figure out how to switch the ad code that gets shown to readers depending on a tag. Ie - the default in the template is to show ad code "A", but if the article happens to have a tag, say "B-TAG", then ad code "B" gets shown instead. Likewise there might be a C or D....

    Anyone know how to write a php switch that would do this? Or a plugin that helps?

    Thanks!

  2. nickaster
    Member
    Posted 5 months ago #

    Does this question make any sense?

  3. alchymyth
    The Sweeper
    Posted 5 months ago #

    what code for ads are you using at the moment?

    generally, try to work with conditional tags, such as has_tag()
    http://codex.wordpress.org/Function_Reference/has_tag
    http://codex.wordpress.org/Conditional_Tags

  4. nickaster
    Member
    Posted 5 months ago #

    Cool ... well it's google doubleclick. So I was thinking I'd just make a bunch of different sets of ad-code and name them all different categories, then I'd add the conditional stuff in wordpress to show the appropriate ad-code if a certain tag was present.

    I'll bet there's an easier way though... anyone have experience with doubleclick in this regard?

Reply

You must log in to post.

About this Topic

Tags

No tags yet.