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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options user 115005

"wp-query" ambiguously refers to one of two things. 1) WP_Query is a class native to WordPress which allows users to query the posts database using a number of criteria. 2) $wp_query is the global variable that holds the main query object prepared by WordPress based on a given request.

2
votes
I understand your confusion but you haven't something to worry about as behinds the scenes Wordpress make all the necessary steps to make it work. For example, take the following code from the class- …
answered Nov 16 '17 by Drupalizeme
0
votes
You have multiple ways to make this work. What you can do for example, target a page and in the theme for this page or better say the template go and read the GET and make the filtering there. Anothe …
answered Nov 2 '17 by Drupalizeme
3
votes
First I would state that in most cases the query_posts should be avoided! This function will completely override the main query and isn’t intended for use by plugins or themes. Its overly-simpli …
answered Nov 18 '17 by Drupalizeme
0
votes
What you want to do is access the query_vars and use them. Base code: Page to access the fields $custom_field = get_query_var('custom_field'); var_dump($custom_field); And the function or custom …
answered Nov 10 '17 by Drupalizeme
2
votes
You should write it as the following: $term_ids = array_map( function( $t ) { return $t->term_id ; }, $terms ); Also in the code, you have the get_terms where you directly write the taxonomy name. …
answered Dec 4 '17 by Drupalizeme
0
votes
You could use the get_search_query(); function. More in developer.wordpress
answered Nov 2 '17 by Drupalizeme
0
votes
You are querying for post author with ID 8 and also you are telling to match the post type to property post type and also post_status to be either publish, acf-disabled, private. Check your post t …
answered Nov 17 '17 by Drupalizeme
0
votes
The query_posts is only useful when you actually know what you are doing. Base on the info you provide this should work for you : $the_query = new WP_Query(array( 'post_type' => 'your_cpt …
answered Dec 5 '17 by Drupalizeme
0
votes
I'm not fun of helper functions so I would write it like this: $args=array( 'post_type' => 'post', 'posts_per_page' => '20', 'post_status' => 'publish', 'order'=>'DESC', 'orderby' …
answered Nov 10 '17 by Drupalizeme
1
vote
You can try: add_action('update_option_sticky_posts', function( $old_value, $value ) { $featured_args = array( 'post__in' => $value, 'post_status' => 'publish' …
answered Dec 8 '17 by Drupalizeme