[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? |
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 <
|
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? |
The first line should be
HTML Code:
<?php if ( is_front_page() AND ($bfa_ata['postcount'] < 3)) { ?> And the other line HTML Code:
<?php } ?> |
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/ |
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()) ) { ?> |
That worked! Thank you!
|
All times are GMT -6. The time now is 08:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.