• Hello,
    I spent ages digging the forum but still no success. Although, I am sure this had been asked before.
    I have a template for my taxonomy and I need to turn off the pagination ONLY on this template.
    I do not query any posts. I just use the loop
    if(have_posts()) : while(have_posts()) : the_post();
    So I see on way to manipulate $paged.

    The reason I want it to be turned off is:
    That custom post taxonomy represents a business. On the top of the page – taxonomy-business_cats-clinic.php – I have a Google Map. And inside the Loop for every business entry I call a JS function to put a new marker on the map. If pagination is turned on, then I have only 10 businesses on one page and of course 10 markers. On the next page other 10 business entries and 10 different markers. But the Google Maps on the top should display each and every entry in this taxonomy.
    I see no other option than to turn the pagination off.

    Any suggestions would be appreciated.

Viewing 1 replies (of 1 total)
  • You should be able to add this just ahead of the ‘if(have_posts())’ loop:

    global $wp_query;
    query_posts(
       array_merge(
          $wp_query->query,
          array('posts_per_page' => -1)
       )
    );

    You may need to wrap that in php tags, depending on the code that is already there.

Viewing 1 replies (of 1 total)
  • The topic ‘Turn off pagination for some specific pages’ is closed to new replies.