Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Question about this code: $bfa_ata['postcount'] == 1 (http://forum.bytesforall.com/showthread.php?t=7176)

adum May 18, 2010 08:22 PM

[SOLVED] Question about this code: $bfa_ata['postcount'] == 1
 
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) ) { ?>

However...

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.

Best,

Adam

Flynn May 19, 2010 04:35 PM

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





adum May 19, 2010 05:09 PM

Perfect! Thanks so much Flynn, that worked exactly how I hoped it would. :)


All times are GMT -6. The time now is 11:24 PM.

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