DEV Community

mhsohag11
mhsohag11

Posted on

Answer: where is wordpress search pagination

Add the following to the bottom of your search.php file:

<?php
if ( $GLOBALS['wp_query']->max_num_pages <= 1 ) {
  return;
}
$args = wp_parse_args(
  $args,
  array(
    'mid_size' => 2,
    'prev_next' => true,
    'prev_text' => __( '&laquo;' ),
    'next_text' => __( '&raquo;' ),
    'screen_reader_text' => __( 'Posts navigation' ),
    'type' => 'array',

Top comments (0)