Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 22, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/4b90c33dc093894c767d to your computer and use it in GitHub Desktop.
Save jchristopher/4b90c33dc093894c767d to your computer and use it in GitHub Desktop.
Modify the LIMIT total of SearchWP searches
<?php
function my_searchwp_query_limit_total( $total, $page, $engine ) {
if ( 'default' == $engine && 10 == $page ) {
$total = 100;
}
return $total;
}
add_fitler( 'searchwp_query_limit_total', 'my_searchwp_query_limit_total', 10, 3 );
@Alcalt
Copy link

Alcalt commented Mar 27, 2015

I used this function and realize you wrote add_fitler instead of add_filter. You also have this error on searchwp_query_limit_start.

@james-nagle
Copy link

Ran into the same typo when I got an error 500 after implementing this filter. Just a friendly notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment