Hi there, first post. I am having a slight problem with paging. I wanted the front page to have only one post, then when you paged with the "next" or "previous" to also only only show one post. However, if you went to a category link, or just a different page I wanted it to display the amount of pages specified in the Settings->Reading->amount per posts.
I created a home.php to attempt to start doing this, it looks identical to MainIndex.php except for this added script
<?php get_header(); query_posts('posts_per_page=1'); //returns only the front page\ ?>
Now the problem is it keeps only giving the front page even thought the paging mechanisms.
The actual paging code is
<div id="paging"> <?php $previous = get_bloginfo('template_directory'); ?> <div id="alignright"><?php next_posts_link('<img src="' . $previous . '/images/previous.png" alt="Previous" title="Previous" />') ?></div> <div id="alignleft"><?php previous_posts_link('<img src="' . $previous . '/images/next.png" alt="Next" title="Next" />') ?></div> </div>
Hope the spacing is okay. While I have a decent amount of coding experience, I am rather new to the scripting/web-development game, and started wordpress yesterday. I don't understand why this code is repeated three times in hte page Page.php, MainIndex.php, and in home.php (well that's kind of my fault), the LOOP is also repeated three times. Im sure there is a sepcific reasonf for this as if they are actually three different places. Just seems rather redundant. Anyhow, anyone know a quick fix to this without adding a plug in?
Thanks for the help!