Forums

Creating Single Post on a Page and Multiple Posts Under Categories (2 posts)

  1. steveironpump
    Member
    Posted 6 months ago #

    Right now, I am using the Twenty Ten Theme on my blog. You can check it out at http://www.bluephoenix-webdesign.com/web-design-blog/

    Anyways, I want to make the blog work in such a way that only one post is listed on the front page. However, I also want a list of multiple posts to show up under my archives as well as my categories when users select these options. Right now, I do not have either of these widgets active because I want multiple posts to show up on them when users select these options.

    How do I make this happen?

  2. vtxyzzy
    Member
    Posted 6 months ago #

    First, you should be making changes in a Child theme, not Twenty Ten because a WP upgrade will wipe out your changes.

    Try placing these 2 lines just before the get_template_part() line in index.php:

    global $query_string;
    if (is_front_page()) query_posts( $query_string . '&posts_per_page=1' );

    so it looks like this:

    global $query_string;
    if (is_front_page()) query_posts( $query_string . '&posts_per_page=1' );
    get_template_part( 'loop', 'index' );

    Then set the number of posts you want in other places under Admin->Settings->Reading.

Reply

You must log in to post.

About this Topic