Remove pagination from WordPress Search page

To remove the pagination from wordpress search page, add the following script in your theme’s functions.php file:

function no_nopaging($query) {
$query->set('nopaging', 1);
}

add_action('parse_query', 'no_nopaging');

And you are done!

Leave a Reply

Your email address will not be published. Required fields are marked *