Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

How to place ads at top of category pages?


  #1  
Old Feb 21, 2009, 11:41 AM
RuthSmith
 
6 posts · Feb 2009
Boston, Massachusetts
I would like to place a relevant ad at the top of each category page on my site. In theory, you would visit the category page and there would be a banner ad and then the content or most recent posts below. Each category page would have a different ad.

Much like what is being done on this site
http://www.bestgreenblogs.com/category/editors-choice/

Alternatively, is there a way to make each sidebar for each category different (for ad placement)? I've managed to have a static home page with a separate right side bar. Then all my other pages have the same right side bar.

Thanks!
Ruth

eta: Tim from best green blogs told me that he inserts the banners on a particular template page to make them show up correctly in Wordpress. Anyone know how to do this?

I see one category template in my cpanel files. WP Codex says to change looks of each category you can make separate category template files by copying original category template. So you'd have category template a, b, c, etc. But how to make it so these new category templates show up correctly or are being called correctly in then end? If that makes any sense?

Last edited by RuthSmith; Feb 21, 2009 at 12:41 PM.
  #2  
Old Feb 22, 2009, 04:57 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You could use the http://wordpress.org/extend/plugins/php-code-widget/ then use the enhanced text widgets that this plugin provides to put widgets with your ad code into a sidebar, with this content

PHP Code:
<?php if ( is_category('9') ) { ?>
AD CODE, i.e. Adsense, or Text, or HTML, or Javascript for this category
<?php ?>
You can use "if this is category XY" in different ways:

When the archive page for Category 9 is being displayed:
PHP Code:
  is_category('9'
When the archive page for the Category with Name "Cheddar Cheeses" is being displayed:
PHP Code:
is_category('Cheddar Cheese'
When the archive page for the Category with Category Slug "blue-cheese" is being displayed:
PHP Code:
is_category('blue-cheese'
When the archive page for the Category 9, or the Category with slug "blue-cheese", or the Category with the name "Cheddar Cheese" is being displayed:
PHP Code:
is_category(array(9,'blue-cheese','Cheddar Cheese')) 

Last edited by Flynn; Feb 25, 2009 at 12:49 PM. Reason: Added one missing {
  #3  
Old Feb 25, 2009, 11:44 AM
RuthSmith
 
6 posts · Feb 2009
Boston, Massachusetts
Thanks so much for the response. I'll digest and give it a try!
  #4  
Old Feb 25, 2009, 12:49 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
RuthSmith, please check the above code again, I missed one { and added it now.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I put the category name at the top of a category page? janey73 Header configuration & styling 5 Jan 4, 2012 02:37 PM
Newbie here. How do I place sidebar in pages? No side bars are shown in pages. xtrong Sidebars & Widgets 12 Jul 10, 2009 06:24 PM
Please help: want to create fixed image for top of each category page WebWeaver Atahualpa 3 Wordpress theme 4 Jun 18, 2009 09:56 AM
Place the Category Menu above the center area Tamas Page & Category Menu Bars 12 Apr 5, 2009 04:02 PM
3.2 to 3.3.1 and now > at top of pages lsilva New Versions, & Updating 3 Mar 31, 2009 01:34 PM


All times are GMT -6. The time now is 11:41 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.