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 » Center area post/pages »

[SOLVED] Adsense between posts on category pages


  #1  
Old May 12, 2011, 03:28 PM
mkellam
 
60 posts · Jan 2011
Hi,
I'm trying to insert Adsense ads after every 3rd item on my category pages.

I'm using this code, which puts the ad after the 3rd item, but I'd also like to put an ad after the 6th item (or every third item). How would I do that? I tried 3,6 but caused a scary looking parsing error!


Code:
<?php if ( is_category() AND $bfa_ata['postcount'] == 3 ) { ?>

Adsense Code Here

<?php } ?>
Also, I put it as the last thing in the loop. Is this the best location if I want it between items on the category page?

Here is a sample URL:
http://www.livingonadime.com/categor...ocery-savings/

Thanks!
Michael
  #2  
Old May 12, 2011, 04:37 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Try this
HTML Code:
<?php if ( is_category() AND (($bfa_ata['postcount'] == 3 ) OR ($bfa_ata['postcount'] == 6 )) ) { ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old May 12, 2011, 08:24 PM
mkellam
 
60 posts · Jan 2011
Thanks, I'll try that!
Michael
  #4  
Old Jun 9, 2011, 01:21 PM
mkellam
 
60 posts · Jan 2011
Just letting you know -- That worked great! Thanks, Juggledad!

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show sticky posts in category pages c32v Atahualpa 3 Wordpress theme 3 Dec 12, 2010 08:37 AM
[SOLVED] Multiple posts on category pages? Tim F Atahualpa 3 Wordpress theme 2 Mar 23, 2010 02:59 AM
Category Pages - Can't See Older Posts SupraTT Plugins & Atahualpa 3 Jan 17, 2010 03:14 PM
Static pages with category posts? mcphoto Atahualpa 3 Wordpress theme 3 Apr 25, 2009 09:48 AM
Posts showing up twice on category pages? michiganbasketball Atahualpa 3 Wordpress theme 1 Mar 12, 2009 04:56 PM


All times are GMT -6. The time now is 03:37 AM.


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