Title: Help with PHP Code for Category Base Ads?
Last modified: August 19, 2016

---

# Help with PHP Code for Category Base Ads?

 *  [cfisher](https://wordpress.org/support/users/cfisher/)
 * (@cfisher)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/help-with-php-code-for-category-base-ads/)
 * 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.
 * Thanks!
    Chris

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

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/help-with-php-code-for-category-base-ads/#post-1468188)
 * [http://wordpress.org/extend/plugins/easy-adsenser/](http://wordpress.org/extend/plugins/easy-adsenser/)
 * [http://wordpress.org/extend/plugins/advertising-manager/](http://wordpress.org/extend/plugins/advertising-manager/)
 *  Thread Starter [cfisher](https://wordpress.org/support/users/cfisher/)
 * (@cfisher)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/help-with-php-code-for-category-base-ads/#post-1468190)
 * 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.

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

The topic ‘Help with PHP Code for Category Base Ads?’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [cfisher](https://wordpress.org/support/users/cfisher/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/help-with-php-code-for-category-base-ads/#post-1468190)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
