WordPress.org

Ready to get started?Download WordPress

Forums

Disable paging on index frontpage like mydomain.com/page/2? (5 posts)

  1. Marc
    Member
    Posted 4 years ago #

    Hi!

    I build a index.php frontpage with a loop through many different categories. But how do I disable the paging functionality? I saw that I got urls like mydomain.com/page/2 and mydomain.com/page/22 How do I disable this?

  2. kz
    Member
    Posted 4 years ago #

    query_posts('posts_per_page=-1');
     /* write here loop stuff */
    wp_reset_query();
  3. Marc
    Member
    Posted 4 years ago #

    Does not work.

    I have 5 loops on my frontpage:

    `$do_not_duplicate = array();
    query_posts('showposts=1');
    while (have_posts()) : the_post();
    $do_not_duplicate[]=get_the_ID();
    // DO STUFF
    endwhile;

    while (have_posts()) : the_post();
    // loop 2
    endwhile;

    while (have_posts()) : the_post();
    // loop 3
    endwhile;

    while (have_posts()) : the_post();
    // loop 4
    endwhile;

    while (have_posts()) : the_post();
    // loop special
    endwhile;

    Have a look here: http://www.marctv.de/page/2/

  4. Marc
    Member
    Posted 4 years ago #

    No idea? =/

  5. kz
    Member
    Posted 4 years ago #

    if(! is_paged()) :
      /* your loops here */
    else :
      <p>Nor found.</p>
    endif;

Topic Closed

This topic has been closed to new replies.

About this Topic