• {Moderator note: moved to Fixing WordPress forum]

    i am using WordPress 4.7.2. theme: twentyFifteen.

    in search.php, there is a loop going through the posts followed by pagination:

    while ( have_posts() ) : the_post();
    get_template_part( ‘content’, ‘search’ );
    endwhile;
    the_posts_pagination(…);

    i suppose the ‘get_template_part’ statement calls content-search.php where i do something including get_post();

    problem is the search results is displayed in pages with results from each post on 1 separate page. How do I get rid of the pagination?

    if i simply comment out the pagination statement, it does not loop through the posts?

    • This topic was modified 7 years, 9 months ago by gdtw.
    • This topic was modified 7 years, 9 months ago by bdbrown.
Viewing 2 replies - 1 through 2 (of 2 total)
  • It will loop through the posts, it just won’t show any more posts beyond the maximum amount specified per page. The pagination is used to break up many results into pages.

    Thread Starter gdtw

    (@gdtw)

    is there a way to make it show all results on 1 page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to rid the search results of pagination?’ is closed to new replies.