• [email protected]

    (@soumyaunknowngmailcom)


    Hello

    I am using this code from Adding_the_.22paged.22_parameter_to_a_query

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    query_posts('posts_per_page=5&paged=' . $paged);
    ?>

    To display only 5 posts on index page, irrespective of Reading setting(by default its 8 now)

    I know how to use the above code applicable for Home/index.php

    the problem is in pagination
    upto 2nd page, its working fine
    but after that[on 3rd page], when I clicked on the third page, it just not working & showing Default error (which I set for index.php)

    here my site link
    tech-8.com/anix/

    may be some filter error or resetting error
    Point to notice
    in my blog there are total 16 posts, and From reading posts per page set to 8.
    So only 16/8 = 2 pages working fine & error goes from 3rd page

    Please look into this
    Many many thanks

  • The topic ‘Getting trouble in custom posts_per_page for index page’ is closed to new replies.