Currently, the search results page displays 6 posts per page. Is this number usually changed at the theme level? How would I go about changing it?
Hello GreatTaste,
If you want to change the structure for your search page you have to change the module for this kind of page and you can do it from Theme panel, like this -> http://screencast.com/t/rFFNw7RPlPp
If is not what you mean, please provide more details so I will be able to provide a more accurate response.
Thanks.
Hi Catalin, thanks for the response. I tried the mentioned solution – though the styling changed, my site still only shows 6 posts per page in the search results page. By “search results page”, I’m referring to the page that is displayed as a result after doing a search. My goal is to increase the number of posts results per page so that the pagination numbers wouldn’t extend so largely (at the moment, it often extends into the 100’s).
Might be basic WP function
perhaps add this to functions file or similar?
add_action('pre_get_posts', 'change_search_limit');
function change_search_limit($query){
$number_of_posts = 30;
if ( $query->is_main_query() && is_search() )
$query->set('posts_per_page', $number_of_posts);
}
or
http://wptricks.net/tutorial-to-display-a-different-number-of-post-on-search-result/
might not be what you’re looking for, but perhaps some nails to help with barn building 😉
Hello GreatTaste,
If you want to increase the number of the posts for your search page, you can set it from wp panel, like this -> http://screencast.com/t/MPLCbnpIlk
Hope this helps!
Thanks.