We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu order for posts is great, except when doing a search where we want most relevant results first.
Is there a way to disable this plugin functionality when just doing a search ?
The text was updated successfully, but these errors were encountered:
So far I have got :
function custom_pre_get_posts($wp_query) { if( is_admin() || ! $wp_query->is_main_query() ) { return; } if (is_search()) { $wp_query->set('orderby', 'relevance'); $wp_query->set('order', 'DESC'); } } add_action('pre_get_posts', 'custom_pre_get_posts');
Sorry, something went wrong.
No branches or pull requests
Menu order for posts is great, except when doing a search where we want most relevant results first.
Is there a way to disable this plugin functionality when just doing a search ?
The text was updated successfully, but these errors were encountered: