StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-24-2011, 09:26 AM
spclient spclient is offline
Registered User
Genesis Member
 
Join Date: Jun 2011
Posts: 17
Default Category & its SubCategories Specific Ad Placement

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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Subcategories on Blog with Only One Category bizzy General Discussion 4 12-31-2009 02:35 AM
Subcategories in Category template TrentArwine General Discussion 1 07-31-2009 06:04 PM


All times are GMT -5. The time now is 08:58 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.