Give help. Get help.

  • # October 17, 2012 at 5:08 am


    I’m having some problem setting up number of posts to show on my blog.

    There is option available to set number of posts to show but as soon as I enter a number & press update it resets back to the default which is 3 & I want to set that to 5.

    Any help in this regard will be highly appreciated.



    # October 17, 2012 at 6:41 am

    I am not too sure on this but I’m sure you have to add the query posts function to the wordpress loop on your index.php file.

    Something like;

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

    I have found this link which I think you’ll find useful.

    Let us know how you get on @tahirk.

    # October 20, 2012 at 1:33 am

    Hi, If you want to show only 5 posts (and don’t care about pagination), you can use query_posts() like so: query_posts( ‘posts_per_page=5’ );
    If you must use query_posts(), make sure you call wp_reset_query() after you’re done.
    Let me know does it work or not………

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.