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 »

[SOLVED] Question about this code: $bfa_ata['postcount'] == 1

Old May 18, 2010, 08:22 PM
adum's Avatar
85 posts · Jun 2009
Hey there,

I use the code "$bfa_ata['postcount'] == 1" to make things show up within the first post on a page.

I use it in conjunction with "is_front_page()", for example:

PHP Code:
<?php if ( (is_front_page() AND $bfa_ata['postcount'] == 1) ) { ?>

Items I place within this PHP also show up on the page 2 of the front page, which I don't want. I only want it to show up on the very first post on page 1.

I've looked through WP codex a little bit and couldn't figure out if there is a way to do this...let me know if you have any ideas.


Old May 19, 2010, 04:35 PM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
Does this work?

PHP Code:
<?php if ( (is_front_page() AND !is_paged() AND $bfa_ata['postcount'] == 1) ) { ?>

See also http://codex.wordpress.org/Condition...s#A_Paged_Page

Old May 19, 2010, 05:09 PM
adum's Avatar
85 posts · Jun 2009
Perfect! Thanks so much Flynn, that worked exactly how I hoped it would.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding code for ads or other sites (newbie when it comes to code issues!) gardentravelbuzz Plugins & Atahualpa 7 Feb 7, 2011 04:43 AM
A little question where to place this code... cpalmer03 Header configuration & styling 1 Apr 23, 2010 02:25 PM
H1, H2, H3 Text Question dilly Excerpts, Read more, Pagination 5 Mar 23, 2010 03:03 PM
wow!!!! another TF question wheresnifty ThemeFrame Presales 3 Feb 15, 2010 04:05 PM
Excerpt question wwday3 Excerpts, Read more, Pagination 2 Jan 28, 2009 06:14 PM

All times are GMT -6. The time now is 09:25 AM.

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