WordPress.org

Ready to get started?Download WordPress

Forums

One post on home page? (8 posts)

  1. Reynder
    Member
    Posted 6 years ago #

    How do specify that I want one post one the homepage without effecting the category pages?

  2. If you go to your administration page, click on OPTIONS - READING and check out the options that area gives you. You can limit your front page to be a static page or show at most, 1 post which will be your most recently published post.

  3. Reynder
    Member
    Posted 6 years ago #

    But this also affects my category pages.

  4. Well, you could specify your homepage to show a static page that you created which wouldn't effect your category pages and the number of posts shown.

  5. Reynder
    Member
    Posted 6 years ago #

    Isn't there an other option like the category_name statement but then specified for the homepage? Maybe the is_home statement?

  6. There is a new home page function that has been added to WordPress 2.5 but is not available in in earlier versions. It's called is_front but has already undergone some changes.

    Introduction of a new template tag is_front() which is only true on the front page of a WordPress install (#3682).

    Renaming of is_front() to is_front_page() to avoid conflict with bbPress.

    Anyways, might want to give that is_front_page a search in the codex and see what to do.

  7. Reynder
    Member
    Posted 6 years ago #

    Thanks for your replies Jeffro!!

  8. Asuka_Aki
    Member
    Posted 5 years ago #

    Is this what you mean? My blog has two posts on the homepage http://lepixelshoppe.com/scrap4dollars

    I used this line instead of the usual get header line of code:

    <?php get_header(); query_posts('posts_per_page=2'); ?>

    Change 2 to what ever number of posts you want to display. It doesn't change my categories or archives.

Topic Closed

This topic has been closed to new replies.

About this Topic