Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] Single Post on front page? (http://forum.bytesforall.com/showthread.php?t=11005)

ryanerickson Nov 6, 2010 08:05 AM

[SOLVED] Single Post on front page?
 
Good day all. I've spent a good protion of the morning searching for the answer, and still can't find it.

I thought I was looking for something simple, but I guess not... What I'm trying to do is have only the most recent (single) post show up on the front page but have follow on pages display the normal 10 (or whatever number) excerpts.

This can sort of be done by changing the "Reading Settings" to "1;" however, doing this also limits the search output. That is, if put to "1" and you conduct a search you'll only get one result at a time... no good.

I'm running Atahualpa 3.5.3 on WP 3.0.1 at ryanerickson.com.

Thoughts?

ryanerickson Nov 7, 2010 07:19 AM

Or, I guess, a better question would be: is there a way to keep the post count at one and modify the search results page to show more than one?

ryanerickson Nov 7, 2010 07:56 AM

I found the answer! Quite simple really; make a copy of index.php thats inside the theme folder and name it home.php. At the top of this new file/page place the following code:

PHP Code:

<?php if (is_home()) {
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("showposts=1&paged=$page");
?>

This will call only the most recent post to the front page (same happens when you click "older entries" as well) but does not mess with search results or the archive pages. As I can't take credit for this I'd like to point you to this post.


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

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