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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay