• Resolved Sunaryo Hadi

    (@sunaryohadi)


    I just found the problem in index.php nor front-page.php when using WP 3.6.1

    <?php
      while ( have_posts() ) : the_post();
        get_template_part( 'content', get_post_format() );
      endwhile;
    ?>

    This will show all the posts (in my case is hundreds of posts, since I already have that data). This is also slowing down the homepage. The other part (category or taxonomy) seem quite ok.

    I check the $WP_Query with var_dump, the value of posts_per_page is correct (10 by default).

    Anybody have the similar situation?

Viewing 1 replies (of 1 total)
  • Thread Starter Sunaryo Hadi

    (@sunaryohadi)

    I just resolve the problem. The problem not the WP 3.6.1, but it’s likely some previous plugins creating options which make homepage run the query with all results. Not sure which one, sorry.

    So, I reset wp_options table using https://www.ads-software.com/plugins/wordpress-database-reset/. Remember, to back up it first, since non-core WP table would be clean up as well, but not restored the content. All WP posts and comments is restored nicely using this plugin.

    Finally, setting all the WP options (inside wp-admin) from the scratch in wp-admin, and the problem dissapear on my site https://www.soreangonline.com.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress 3.6.1 ignore posts_per_page in homepage?’ is closed to new replies.