Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   [SOLVED] How can I get more posts to show up on archive/category pages? (http://forum.bytesforall.com/showthread.php?t=7765)

cowgrrrl Jun 24, 2010 11:05 PM

[SOLVED] How can I get more posts to show up on archive/category pages?
 
Under Settings, I have set my blog to show a maximum of two posts. This is what I would like on the main page. However, that setting also apparently applies to all pages, including the archives and category pages.

Is there a way that I can show more posts on these secondary pages?

juggledad Jun 25, 2010 03:20 AM

You shoul set the posts in the dashboard-settings-reading to the max you want on any page, then in ato-style & edit center column-The LOOP you coulees add some php logic to only display 2 posts if you are on the format page. See the example in the documentation on the page and change the == to <

cowgrrrl Jun 25, 2010 06:44 PM

OK, I found the loop and experimented with the code examples, but I'm not quite getting it. Can you show me what exactly this code should say (for two posts on the home page)?


[?php if ( is_front_page() AND $bfa_ata['postcount'] < 2 ) { ?>

<?php } ?]


(I changed the end brackets to avoid any potential problems.)

Also, does it matter where in the loop it goes?

juggledad Jun 25, 2010 09:38 PM

The first line should be
HTML Code:

<?php if ( is_front_page() AND ($bfa_ata['postcount'] < 3)) { ?>
and will be the very first line of ato->Style & Edit Center Area->The LOOP
And the other line
HTML Code:

<?php } ?>
will be the very last line of The LOOP

cowgrrrl Jun 25, 2010 11:13 PM

Well, that did exactly what I wanted on the home page -- thanks! -- but it somehow seriously screwed up the rest of my site. Other pages are missing most of their content now.

??

http://patiastephens.com/wordpress/

juggledad Jun 26, 2010 03:48 AM

My fault, I aways forget about the rest of the pages. In englist what you have now says'If you are on the front page and this is the first or second post display it" but you need 'or this is not the front page'
so change teh first line to
HTML Code:

<?php if ( (is_front_page() AND ($bfa_ata['postcount'] < 3)) OR (!is_front_page()) ) { ?>

cowgrrrl Jun 26, 2010 11:10 AM

That worked! Thank you!


All times are GMT -6. The time now is 08:05 AM.

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