Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
The method by which users find information on your WordPress site
1
vote
Accepted
How to interfere to default search to make it search in custom fields?
You are getting all post because you didn't pass meta query correctly. Try this below code
function add_search_in_custom_fields( $query ) {
// check the query type.
if ( $query->is_search ) {
…
0
votes
Issue with Wordpress category search
You can search post by modify the query using pre_get_post filter. add this code inside your functions.php file
add_filter('pre_get_posts', 'search_by_category');
function search_by_category($wp_query …
3
votes
Accepted
tax_query shows no results if nothing is selected
So far good, add taxonomy condition by checking the suburbs and states Value.
// Suburbs
if( !empty( $_GET['suburbs'] ) ) {
$suburbs = $_GET['suburbs'];
}
// States
if( !empty( $_GET['states'] …