Search results

This commit is contained in:
2018-12-12 20:50:59 +00:00
parent cd62a1df23
commit 1f9e8f7607
8 changed files with 133 additions and 5 deletions

View File

@@ -76,3 +76,11 @@ function windycoys_share_twitter_url() {
$link = get_the_permalink();
echo $url . urlencode($title . ': ' . $link . ' by @WindyCOYS');
}
function windycoys_search_posts_per_page($query) {
if ($query->is_search) {
$query->set( 'posts_per_page', '10' );
}
return $query;
}
add_filter('pre_get_posts', 'windycoys_search_posts_per_page');