Help with PHP Code for Category Base Ads? (3 posts)

  1. cfisher
    Posted 5 years ago #

    I am not PHP literate, and I want to see if the community could be kind enough to help write a php script? I use Google Ad Manager, and I need to add category specific ads to single posts. It will be nightmare if I have manually manage ads for each post/category. I assume the best approach would be to add php script to the page.php?

    Can someone suggest an easily customizable php script for my site?
    I think something like this would work:
    'If this post-category, then [insert Google Ad Manager javascript]; else, check for next category (repeat this call for however may categories I need);
    if no categories match, then [insert Google Adsense javascript]
    close php call'

    I am open to other ideas if there is a better way to do this.


  2. Samuel B
    Posted 5 years ago #

  3. cfisher
    Posted 5 years ago #

    Thanks for the quick response.

    Has anyone used either of these plugins with Google Ad Manager? I do use Google Adsense, but my entire website is handled through Google Ad Manager.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.