Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

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


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old May 18, 2010, 08:22 PM
adum's Avatar
adum
 
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) ) { ?>
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
  #2  
Old May 19, 2010, 04:35 PM
Flynn's Avatar
Flynn
 
3,762 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




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

Bookmarks

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 06:02 AM.


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