Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

[SOLVED] Show a widget or PHP insert every 2 posts?

Old May 17, 2010, 11:33 PM
13 posts · Aug 2009
Is there a way I can do this?

For example insert a call for a widget in center column of homepage via a php string -- but show that widget content NOT under every single post on the homepage -- but every 2 or 3 posts?

WP 2.9.2
Ata 3.4.6
Old May 18, 2010, 07:13 AM
juggledad's Avatar
23,750 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you could go to ATO->Style & edit CENTER COLUMN->The LOOP and add some php logic to compute the post count then displaythe AD when you want.
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Old May 18, 2010, 04:01 PM
13 posts · Aug 2009
Thx JD - that worked very nicely -- and thx to Atahualpa for being such a great theme allowing this customization.
I used

<?php if ( is_front_page() AND $bfa_ata['postcount'] == 2 ) { ?>
my widget here
<?php } ?>

to make this work


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
php in footer.php - links to just show up on homepage chris Atahualpa 3 Wordpress theme 6 May 9, 2010 12:50 PM
how to insert php code into widget or sidebar Stingraynut Header configuration & styling 1 Apr 6, 2010 08:25 PM
How do I insert a line to show under Widget Title GreenEyedMonst Sidebars & Widgets 1 Jan 17, 2010 05:50 AM
How to insert php code into Byline JakeThePeg Post-Kicker, -Byline & -Footer 1 Aug 27, 2009 06:16 PM
Need future posts to show up in calendar widget bluedogcreative Sidebars & Widgets 4 Jul 12, 2009 01:46 PM

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

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