Is there an efficient way of placing different ad channels depending on the posts category/subcategories?
In such a way that any posts under
dogs category or dog subcategories such as hounds etc... will be shown a dog channel adsense ad.
Whereas, any posts under
cat category or cat subcategories such as siamese cats etc... will be shown a cat channel adsense ad.
I can always add additional adsense.php and rename it adsense-dog.php, adsense-cat.php etc... but I dont how to place it in the genesis function file.
Code:
// Add Google AdSense before single post
add_action('genesis_before_post_content', 'magazine_include_adsense');
function magazine_include_adsense() {
if(is_single())
require(CHILD_DIR.'/adsense.php');
}
Many Thanks in advance