WordPress.org

Ready to get started?Download WordPress

Forums

How to set home page only show 1 post (10 posts)

  1. zimmer
    Member
    Posted 5 years ago #

    I've enter 1 post at most in the WP setting interface-Reading, but my website still showing 2 posts for 1 page and also for home page. Any way to solve this issue?

    my site: http://www.zimmer.site90.com

  2. Roy
    Member
    Posted 5 years ago #

    Hm, it's not browser or WP (plugin) cache, since I get to posts too (next to eachtother too btw.). It DOES work on archive pages (but there you don't show the photos). Perhaps there's something hardcoded in the index.php of your theme?

  3. krembo99
    Member
    Posted 5 years ago #

    you are using some variant of the Hamingway theme...
    In that theme, the query is defined WITHIN the index file..
    find this line :

    $wp_query->query('showposts=2'.'&paged='.$paged);

    and try to change it to :

    $wp_query->query('showposts=1'.'&paged='.$paged);

    You can see on here : http://www.krembo99.com

    This is the same method - only for unlimited posts, using

    $wp_query->query('showposts=9999'.'&paged='.$paged);

  4. zimmer
    Member
    Posted 5 years ago #

    Great thanks to krembo99! I solve the problem now! BTW, your site is amazing, especially those pictures and the top right corner, what's that plug?

  5. cobrakai
    Member
    Posted 5 years ago #

    I've been trying to use a query like this to display 5 posts on front page and then my paged posts to display 10 (as set in the settings panel) .. is there any way to modify the query above to accomplish this?

    Ta,
    CK

  6. Asuka_Aki
    Member
    Posted 5 years ago #

    Use the following code instead of get header:

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

    and leave your blog settings at "display 10 posts"...that only affects your archives and categories.

  7. zimmer
    Member
    Posted 5 years ago #

    Aki, you solved my Archives problem, thank you so much!

  8. krembo99
    Member
    Posted 5 years ago #

    @zimmer -I am glad it helped and that you liked my site, but what images are you talking about ? and what plug ?

  9. zimmer
    Member
    Posted 5 years ago #

    actually I mean CyberSpy me, tks, Kern!

  10. changez
    Member
    Posted 5 years ago #

    where i post it?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.