Forums

[resolved] One Post on Home Page and multiple posts for Tags? (4 posts)

  1. falcor200
    Member
    Posted 3 years ago #

    Hi I am wondering if its possible to have just one post on the homepage but when someone clicks on a tag or category it can show like 5 posts instead of just one. Is there an easy way to do this? Thanks!

  2. falcor200
    Member
    Posted 3 years ago #

    I searched the forum and saw that I should change the <?php get_header(); ?> on the index.php to <?php get_header(); query_posts('posts_per_page=1'); ?> and that seemed to work and I was able to have just one post on the home page and 5 posts on the tags and categories etc... But after I added this code on the home page when I click previous post instead of going to the last post it just reloads the same page over and over. Anyone know what I am doing wrong?

  3. falcor200
    Member
    Posted 3 years ago #

    After much searching I have solved the problem. In case anyone needs help in the future I found this thread http://wordpress.org/support/topic/185209?replies=9 and it answered my question. The correct way to write it is: <?php get_header(); query_posts($query_string.'&posts_per_page=1'); ?> and not the way I read about before.

  4. lamoure1234
    Member
    Posted 3 years ago #

    man!!! you rock. thanks for sharing you saved me lots of trouble.
    thanks a million. ^.^

Topic Closed

This topic has been closed to new replies.

About this Topic