Rất tiếc không tìm thấy tour phù hợp với yêu cầu của Quý khách. Vui lòng liên hệ với chúng tôi để được tư vấn chi tiết.
Khách sạn tại Darwin
- →$wp_query WP_Query(54)
- contents
- Available methods (66)
- →public query -> array(8)
- 'post_type' => string(9) "khach-san"
- →'post_status' => array(1)
- string(7) "publish"
- 'paged' => integer1
- 'posts_per_page' => integer20
- 'sort_by_price' => integer1
- →'meta_query' => array(3)
key compare "hot_ks" "check_hot" "meta_value_num" "select_sao" "select_sao" "meta_value_num" "_price_2025" "_price_2025" "meta_value_num"
- →'orderby' => array(4)
- 'hot_ks' => string(4) "desc"
- 'select_sao' => string(4) "desc"
- '_price_2025' => string(3) "ASC"
- 'date' => string(4) "DESC"
- →'tax_query' => array(1)
- →array(3)
- 'taxonomy' => string(17) "category-dia_diem"
- 'field' => string(4) "slug"
- 'terms' => string(20) "khach-san-tai-darwin"
- →public query_vars -> array(71)
- 'post_type' => string(9) "khach-san"
- →'post_status' => array(1)
- string(7) "publish"
- 'paged' => integer1
- 'posts_per_page' => integer20
- 'sort_by_price' => integer1
- →'meta_query' => array(3)
key compare "hot_ks" "check_hot" "meta_value_num" "select_sao" "select_sao" "meta_value_num" "_price_2025" "_price_2025" "meta_value_num"
- →'orderby' => array(4)
- 'hot_ks' => string(4) "desc"
- 'select_sao' => string(4) "desc"
- '_price_2025' => string(3) "ASC"
- 'date' => string(4) "DESC"
- →'tax_query' => array(1)
- →array(3)
- 'taxonomy' => string(17) "category-dia_diem"
- 'field' => string(4) "slug"
- 'terms' => string(20) "khach-san-tai-darwin"
- 'error' => string(0) ""
- 'm' => string(0) ""
- 'p' => integer0
- 'post_parent' => string(0) ""
- 'subpost' => string(0) ""
- 'subpost_id' => string(0) ""
- 'attachment' => string(0) ""
- 'attachment_id' => integer0
- 'name' => string(0) ""
- 'static' => string(0) ""
- 'pagename' => string(0) ""
- 'page_id' => integer0
- 'second' => string(0) ""
- 'minute' => string(0) ""
- 'hour' => string(0) ""
- 'day' => integer0
- 'monthnum' => integer0
- 'year' => integer0
- 'w' => integer0
- 'category_name' => string(0) ""
- 'tag' => string(0) ""
- 'cat' => string(0) ""
- 'tag_id' => string(0) ""
- 'author' => string(0) ""
- 'author_name' => string(0) ""
- 'feed' => string(0) ""
- 'tb' => string(0) ""
- 'meta_key' => string(0) ""
- 'meta_value' => string(0) ""
- 'preview' => string(0) ""
- 's' => string(0) ""
- 'sentence' => string(0) ""
- 'title' => string(0) ""
- 'fields' => string(0) ""
- 'menu_order' => string(0) ""
- 'embed' => string(0) ""
- 'category__in' => array(0)
- 'category__not_in' => array(0)
- 'category__and' => array(0)
- 'post__in' => array(0)
- 'post__not_in' => array(0)
- 'post_name__in' => array(0)
- 'tag__in' => array(0)
- 'tag__not_in' => array(0)
- 'tag__and' => array(0)
- 'tag_slug__in' => array(0)
- 'tag_slug__and' => array(0)
- 'post_parent__in' => array(0)
- 'post_parent__not_in' => array(0)
- 'author__in' => array(0)
- 'author__not_in' => array(0)
- 'ignore_sticky_posts' => boolFALSE
- 'suppress_filters' => boolFALSE
- 'cache_results' => boolTRUE
- 'update_post_term_cache' => boolTRUE
- 'lazy_load_term_meta' => boolTRUE
- 'update_post_meta_cache' => boolTRUE
- 'nopaging' => boolFALSE
- 'comments_per_page' => string(2) "50"
- 'no_found_rows' => boolFALSE
- 'taxonomy' => string(17) "category-dia_diem"
- 'term' => string(20) "khach-san-tai-darwin"
- 'order' => string(4) "DESC"
- →public tax_query -> WP_Tax_Query(6)
- contents
- Available methods (11)
- Static class properties (1)
- →public queries -> array(1)
- →array(5)
- 'taxonomy' => string(17) "category-dia_diem"
- →'terms' => array(1)
- string(20) "khach-san-tai-darwin"
- 'field' => string(4) "slug"
- 'operator' => string(2) "IN"
- 'include_children' => boolTRUE
- public relation -> string(3) "AND"
- →protected table_aliases -> array(1)
- string(21) "wp_term_relationships"
- →public queried_terms -> array(1)
- →'category-dia_diem' => array(2)
- →'terms' => array(1)
- string(20) "khach-san-tai-darwin"
- 'field' => string(4) "slug"
- public primary_table -> string(8) "wp_posts"
- public primary_id_column -> string(2) "ID"
- →public __construct($tax_query)
Constructor. @since 3.1.0 @since 4.1.0 Added support for `$operator` 'NOT EXISTS' and 'EXISTS' values. @param array $tax_query { Array of taxonomy query clauses. @type string $relation Optional. The MySQL keyword used to join the clauses of the query. Accepts 'AND', or 'OR'. Default 'AND'. @type array { Optional. An array of first-order clause parameters, or another fully-formed tax query. @type string $taxonomy Taxonomy being queried. Optional when field=term_taxonomy_id. @type string|int|array $terms Term or terms to filter by. @type string $field Field to match $terms against. Accepts 'term_id', 'slug', 'name', or 'term_taxonomy_id'. Default: 'term_id'. @type string $operator MySQL operator to be used with $terms in the WHERE clause. Accepts 'AND', 'IN', 'NOT IN', 'EXISTS', 'NOT EXISTS'. Default: 'IN'. @type bool $include_children Optional. Whether to include child terms. Requires a $taxonomy. Default: true. } } Defined in <ROOT>/wp-includes/class-wp-tax-query.php:114
- →public get_sql($primary_table, $primary_id_column) -> array {
Generates SQL clauses to be appended to a main query. @since 3.1.0 @param string $primary_table Database table where the object being filtered is stored (eg wp_users). @param string $primary_id_column ID column for the filtered object in $primary_table. @return array { Array containing JOIN and WHERE SQL clauses to append to the main query. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-tax-query.php:246
- →public get_sql_for_clause(&$clause, $parent_query) -> array {
Generate SQL JOIN and WHERE clauses for a "first-order" query clause. @since 4.1.0 @global wpdb $wpdb The WordPress database abstraction object. @param array $clause Query clause (passed by reference). @param array $parent_query Parent query array. @return array { Array containing JOIN and WHERE SQL clauses to append to a first-order query. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-tax-query.php:383
- →public sanitize_query($queries) -> array Sanitized array of query clauses.
Ensure the 'tax_query' argument passed to the class constructor is well-formed. Ensures that each query-level clause has a 'relation' key, and that each first-order clause contains all the necessary keys from `$defaults`. @since 4.1.0 @param array $queries Array of queries clauses. @return array Sanitized array of query clauses. Defined in <ROOT>/wp-includes/class-wp-tax-query.php:135
- →public sanitize_relation($relation) -> string Sanitized relation ('AND' or 'OR').
Sanitize a 'relation' operator. @since 4.1.0 @param string $relation Raw relation key from the query argument. @return string Sanitized relation ('AND' or 'OR'). Defined in <ROOT>/wp-includes/class-wp-tax-query.php:206
- →public transform_query(&$query, $resulting_field)
Transforms a single query, from one field to another. Operates on the `$query` object by reference. In the case of error, `$query` is converted to a WP_Error object. @since 3.2.0 @global wpdb $wpdb The WordPress database abstraction object. @param array $query The single query. Passed by reference. @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id', or 'term_id'. Default 'term_id'. Defined in <ROOT>/wp-includes/class-wp-tax-query.php:592
- →protected static is_first_order_clause($query) -> bool Whether the query clause is a first-order clause.
Determine whether a clause is first-order. A "first-order" clause is one that contains any of the first-order clause keys ('terms', 'taxonomy', 'include_children', 'field', 'operator'). An empty clause also counts as a first-order clause, for backward compatibility. Any clause that doesn't meet this is determined, by process of elimination, to be a higher-order query. @since 4.1.0 @param array $query Tax query arguments. @return bool Whether the query clause is a first-order clause. Defined in <ROOT>/wp-includes/class-wp-tax-query.php:228
- →protected find_compatible_table_alias($clause, $parent_query) -> string|false Table alias if found, otherwise false.
Identify an existing table alias that is compatible with the current query clause. We avoid unnecessary table joins by allowing each clause to look for an existing table alias that is compatible with the query that it needs to perform. An existing alias is compatible if (a) it is a sibling of `$clause` (ie, it's under the scope of the same relation), and (b) the combination of operator and relation between the clauses allows for a shared table join. In the case of WP_Tax_Query, this only applies to 'IN' clauses that are connected by the relation 'OR'. @since 4.1.0 @param array $clause Query clause. @param array $parent_query Parent query of $clause. @return string|false Table alias if found, otherwise false. Defined in <ROOT>/wp-includes/class-wp-tax-query.php:503
- →protected get_sql_clauses() -> array {
Generate SQL clauses to be appended to a main query. Called by the public WP_Tax_Query::get_sql(), this method is abstracted out to maintain parity with the other Query classes. @since 4.1.0 @return array { Array containing JOIN and WHERE SQL clauses to append to the main query. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-tax-query.php:268
- →protected get_sql_for_query(&$query, $depth = 0) -> array {
Generate SQL clauses for a single query array. If nested subqueries are found, this method recurses the tree to produce the properly nested SQL. @since 4.1.0 @param array $query Query to parse (passed by reference). @param int $depth Optional. Number of tree levels deep we currently are. Used to calculate indentation. Default 0. @return array { Array containing JOIN and WHERE SQL clauses to append to a single query array. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-tax-query.php:301
- →private clean_query(&$query)
Validates a single query. @since 3.2.0 @param array $query The single query. Passed by reference. Defined in <ROOT>/wp-includes/class-wp-tax-query.php:544
- →private $no_results :: array(2)
0 "join" "" "where" "0 = 1"
- →public meta_query -> WP_Meta_Query(9)
- contents
- Available methods (12)
- →public queries -> array(4)
- →'hot_ks' => array(2)
- 'key' => string(9) "check_hot"
- 'compare' => string(14) "meta_value_num"
- →'select_sao' => array(2)
- 'key' => string(10) "select_sao"
- 'compare' => string(14) "meta_value_num"
- →'_price_2025' => array(2)
- 'key' => string(11) "_price_2025"
- 'compare' => string(14) "meta_value_num"
- 'relation' => string(3) "AND"
- public relation -> string(3) "AND"
- public meta_table -> string(11) "wp_postmeta"
- public meta_id_column -> string(7) "post_id"
- public primary_table -> string(8) "wp_posts"
- public primary_id_column -> string(2) "ID"
- →protected table_aliases -> array(3)
- string(11) "wp_postmeta"
- string(3) "mt1"
- string(3) "mt2"
- →protected clauses -> array(3)
key compare compare_key alias cast "hot_ks" "check_hot" "=" "=" "wp_postmeta" "CHAR" "select_sao" "select_sao" "=" "=" "mt1" "CHAR" "_price_2025" "_price_2025" "=" "=" "mt2" "CHAR"
- protected has_or_relation -> boolFALSE
- →public __construct($meta_query = false)
Constructor. @since 3.2.0 @since 4.2.0 Introduced support for naming query clauses by associative array keys. @since 5.1.0 Introduced $compare_key clause parameter, which enables LIKE key matches. @param array $meta_query { Array of meta query clauses. When first-order clauses or sub-clauses use strings as their array keys, they may be referenced in the 'orderby' parameter of the parent query. @type string $relation Optional. The MySQL keyword used to join the clauses of the query. Accepts 'AND', or 'OR'. Default 'AND'. @type array { Optional. An array of first-order clause parameters, or another fully-formed meta query. @type string $key Meta key to filter by. @type string $compare_key MySQL operator used for comparing the $key. Accepts '=' and 'LIKE'. Default '='. @type string $value Meta value to filter by. @type string $compare MySQL operator used for comparing the $value. Accepts '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN', 'REGEXP', 'NOT REGEXP', 'RLIKE', 'EXISTS' or 'NOT EXISTS'. Default is 'IN' when `$value` is an array, '=' otherwise. @type string $type MySQL data type that the meta_value column will be CAST to for comparisons. Accepts 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', or 'UNSIGNED'. Default is 'CHAR'. } } Defined in <ROOT>/wp-includes/class-wp-meta-query.php:129
- →public get_cast_for_type($type = "") -> string MySQL type.
Return the appropriate alias for the given meta type if applicable. @since 3.7.0 @param string $type MySQL type to cast meta_value. @return string MySQL type. Defined in <ROOT>/wp-includes/class-wp-meta-query.php:280
- →public get_clauses() -> array Meta clauses.
Get a flattened list of sanitized meta clauses. This array should be used for clause lookup, as when the table alias and CAST type must be determined for a value of 'orderby' corresponding to a meta clause. @since 4.2.0 @return array Meta clauses. Defined in <ROOT>/wp-includes/class-wp-meta-query.php:682
- →public get_sql($type, $primary_table, $primary_id_column, $context = NULL) -> false|array {
Generates SQL clauses to be appended to a main query. @since 3.2.0 @param string $type Type of meta, eg 'user', 'post'. @param string $primary_table Database table where the object being filtered is stored (eg wp_users). @param string $primary_id_column ID column for the filtered object in $primary_table. @param object $context Optional. The main query object. @return false|array { Array containing JOIN and WHERE SQL clauses to append to the main query. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-meta-query.php:314
- →public get_sql_for_clause(&$clause, $parent_query, $clause_key = "") -> array {
Generate SQL JOIN and WHERE clauses for a first-order query clause. "First-order" means that it's an array with a 'key' or 'value'. @since 4.1.0 @global wpdb $wpdb WordPress database abstraction object. @param array $clause Query clause (passed by reference). @param array $parent_query Parent query array. @param string $clause_key Optional. The array key used to name the clause in the original `$meta_query` parameters. If not provided, a key will be generated automatically. @return array { Array containing JOIN and WHERE SQL clauses to append to a first-order query. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-meta-query.php:486
- →public has_or_relation() -> bool True if the query contains any `OR` relations, otherwise false.
Checks whether the current query has any OR relations. In some cases, the presence of an OR relation somewhere in the query will require the use of a `DISTINCT` or `GROUP BY` keyword in the `SELECT` clause. The current method can be used in these cases to determine whether such a clause is necessary. @since 4.3.0 @return bool True if the query contains any `OR` relations, otherwise false. Defined in <ROOT>/wp-includes/class-wp-meta-query.php:763
- →public parse_query_vars($qv)
Constructs a meta query based on 'meta_*' query vars @since 3.2.0 @param array $qv The query variables Defined in <ROOT>/wp-includes/class-wp-meta-query.php:232
- →public sanitize_query($queries) -> array Sanitized array of query clauses.
Ensure the 'meta_query' argument passed to the class constructor is well-formed. Eliminates empty items and ensures that a 'relation' is set. @since 4.1.0 @param array $queries Array of query clauses. @return array Sanitized array of query clauses. Defined in <ROOT>/wp-includes/class-wp-meta-query.php:153
- →protected find_compatible_table_alias($clause, $parent_query) -> string|bool Table alias if found, otherwise false.
Identify an existing table alias that is compatible with the current query clause. We avoid unnecessary table joins by allowing each clause to look for an existing table alias that is compatible with the query that it needs to perform. An existing alias is compatible if (a) it is a sibling of `$clause` (ie, it's under the scope of the same relation), and (b) the combination of operator and relation between the clauses allows for a shared table join. In the case of WP_Meta_Query, this only applies to 'IN' clauses that are connected by the relation 'OR'. @since 4.1.0 @param array $clause Query clause. @param array $parent_query Parent query of $clause. @return string|bool Table alias if found, otherwise false. Defined in <ROOT>/wp-includes/class-wp-meta-query.php:706
- →protected get_sql_clauses() -> array {
Generate SQL clauses to be appended to a main query. Called by the public WP_Meta_Query::get_sql(), this method is abstracted out to maintain parity with the other Query classes. @since 4.1.0 @return array { Array containing JOIN and WHERE SQL clauses to append to the main query. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-meta-query.php:367
- →protected get_sql_for_query(&$query, $depth = 0) -> array {
Generate SQL clauses for a single query array. If nested subqueries are found, this method recurses the tree to produce the properly nested SQL. @since 4.1.0 @param array $query Query to parse (passed by reference). @param int $depth Optional. Number of tree levels deep we currently are. Used to calculate indentation. Default 0. @return array { Array containing JOIN and WHERE SQL clauses to append to a single query array. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. } Defined in <ROOT>/wp-includes/class-wp-meta-query.php:400
- →protected is_first_order_clause($query) -> bool Whether the query clause is a first-order clause.
Determine whether a query clause is first-order. A first-order meta query clause is one that has either a 'key' or a 'value' array key. @since 4.1.0 @param array $query Meta query arguments. @return bool Whether the query clause is a first-order clause. Defined in <ROOT>/wp-includes/class-wp-meta-query.php:221
- public date_query -> boolFALSE
- →public request -> string(857) "SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relations…"
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) INNER JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id ) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (820) ) AND ( wp_postmeta.meta_key = 'check_hot' AND mt1.meta_key = 'select_sao' AND mt2.meta_key = '_price_2025' ) AND wp_posts.post_type = 'khach-san' AND ((wp_posts.post_status = 'publish')) GROUP BY wp_posts.ID ORDER BY CAST(wp_postmeta.meta_value AS decimal) DESC, CAST(mt1.meta_value AS decimal) DESC, CAST(mt1.meta_value AS decimal) DESC,IF(mt2.meta_value='0', 1, 0) ASC,CAST(mt2.meta_value AS decimal) ASC, wp_posts.post_date DESC LIMIT 0, 20
- public posts -> array(0)
- public post_count -> integer0
- public current_post -> integer-1
- public in_the_loop -> boolFALSE
- public comment_count -> integer0
- public current_comment -> integer-1
- public found_posts -> integer0
- public max_num_pages -> integer0
- public max_num_comment_pages -> integer0
- public is_single -> boolFALSE
- public is_preview -> boolFALSE
- public is_page -> boolFALSE
- public is_archive -> boolTRUE
- public is_date -> boolFALSE
- public is_year -> boolFALSE
- public is_month -> boolFALSE
- public is_day -> boolFALSE
- public is_time -> boolFALSE
- public is_author -> boolFALSE
- public is_category -> boolFALSE
- public is_tag -> boolFALSE
- public is_tax -> boolTRUE
- public is_search -> boolFALSE
- public is_feed -> boolFALSE
- public is_comment_feed -> boolFALSE
- public is_trackback -> boolFALSE
- public is_home -> boolFALSE
- public is_privacy_policy -> boolFALSE
- public is_404 -> boolFALSE
- public is_embed -> boolFALSE
- public is_paged -> boolFALSE
- public is_admin -> boolFALSE
- public is_attachment -> boolFALSE
- public is_singular -> boolFALSE
- public is_robots -> boolFALSE
- public is_posts_page -> boolFALSE
- public is_post_type_archive -> boolTRUE
- private query_vars_hash -> string(32) "6fb8ec15a255b537c773207b4ea73110"
- private query_vars_changed -> boolFALSE
- public thumbnails_cached -> boolFALSE
- private stopwords -> NULL
- →private compat_fields -> array(2)
- string(15) "query_vars_hash"
- string(18) "query_vars_changed"
- →private compat_methods -> array(2)
- string(16) "init_query_flags"
- string(15) "parse_tax_query"
- public queried_object -> NULL
- public queried_object_id -> NULL
- public post -> NULL
- public comments -> NULL
- public comment -> NULL
- →public __call($name, $arguments) -> mixed|false Return value of the callback, false otherwise.
Make private/protected methods readable for backward compatibility. @since 4.0.0 @param string $name Method to call. @param array $arguments Arguments to pass when calling. @return mixed|false Return value of the callback, false otherwise. Defined in <ROOT>/wp-includes/class-wp-query.php:3554
- →public __construct($query = "")
Constructor. Sets up the WordPress query, if parameter is not empty. @since 1.5.0 @param string|array $query URL query string or array of vars. Defined in <ROOT>/wp-includes/class-wp-query.php:3511
- →public __get($name) -> mixed Property.
Make private properties readable for backward compatibility. @since 4.0.0 @param string $name Property to get. @return mixed Property. Defined in <ROOT>/wp-includes/class-wp-query.php:3525
- →public __isset($name) -> bool Whether the property is set.
Make private properties checkable for backward compatibility. @since 4.0.0 @param string $name Property to check if set. @return bool Whether the property is set. Defined in <ROOT>/wp-includes/class-wp-query.php:3539
- →public fill_query_vars($array) -> array Complete query variables with undefined ones filled in empty.
Fills in the query variables, which do not exist within the parameter. @since 2.1.0 @since 4.4.0 Removed the `comments_popup` public query variable. @param array $array Defined query variables. @return array Complete query variables with undefined ones filled in empty. Defined in <ROOT>/wp-includes/class-wp-query.php:530
- →public generate_postdata($post) -> array|bool $elements Elements of post or false on failure.
Generate post data. @since 5.2.0 @param WP_Post|object|int $post WP_Post instance or Post ID/object. @return array|bool $elements Elements of post or false on failure. Defined in <ROOT>/wp-includes/class-wp-query.php:4233
- →public get($query_var, $default = "") -> mixed Contents of the query variable.
Retrieve query variable. @since 1.5.0 @since 3.9.0 The `$default` argument was introduced. @param string $query_var Query variable key. @param mixed $default Optional. Value to return if the query variable is not set. Default empty. @return mixed Contents of the query variable. Defined in <ROOT>/wp-includes/class-wp-query.php:1707
- →public get_posts() -> WP_Post[]|int[] Array of post objects or post IDs.
Retrieves an array of posts based on query variables. There are a few filters and actions that can be used to modify the post database query. @since 1.5.0 @return WP_Post[]|int[] Array of post objects or post IDs. Defined in <ROOT>/wp-includes/class-wp-query.php:1737
- →public get_queried_object() -> object
Retrieve queried object. If queried object is not set, then the queried object will be set from the category, tag, taxonomy, posts page, single post, page, or author query variable. After it is set up, it will be returned. @since 1.5.0 @return object Defined in <ROOT>/wp-includes/class-wp-query.php:3418
- →public get_queried_object_id() -> int
Retrieve ID of the current queried object. @since 1.5.0 @return int Defined in <ROOT>/wp-includes/class-wp-query.php:3492
- →public have_comments() -> bool True, if more comments. False, if no more posts.
Whether there are more comments available. Automatically rewinds comments when finished. @since 2.2.0 @return bool True, if more comments. False, if no more posts. Defined in <ROOT>/wp-includes/class-wp-query.php:3371
- →public have_posts() -> bool True if posts are available, false if end of loop.
Determines whether there are more posts available in the loop. Calls the {@see 'loop_end'} action when the loop is complete. @since 1.5.0 @return bool True if posts are available, false if end of loop. Defined in <ROOT>/wp-includes/class-wp-query.php:3286
- →public init()
Initiates object properties and sets default values. @since 1.5.0 Defined in <ROOT>/wp-includes/class-wp-query.php:490
- →public is_404() -> bool
Is the query a 404 (returns no results)? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4137
- →public is_archive() -> bool
Is the query for an existing archive page? Month, Year, Category, Author, Post Type archive... @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3570
- →public is_attachment($attachment = "") -> bool
Is the query for an existing attachment page? @since 3.1.0 @param mixed $attachment Attachment ID, title, slug, or array of such. @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3604
- →public is_author($author = "") -> bool
Is the query for an existing author archive page? If the $author parameter is specified, this function will additionally check if the query is for one of the authors specified. @since 3.1.0 @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3638
- →public is_category($category = "") -> bool
Is the query for an existing category archive page? If the $category parameter is specified, this function will additionally check if the query is for one of the categories specified. @since 3.1.0 @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs. @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3673
- →public is_comment_feed() -> bool
Is the query for a comments feed? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3846
- →public is_comments_popup() -> bool
Whether the current URL is within the comments popup window. @since 3.1.0 @deprecated 4.5.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3792
- →public is_date() -> bool
Is the query for an existing date archive? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3805
- →public is_day() -> bool
Is the query for an existing day archive? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3816
- →public is_embed() -> bool
Is the query for an embedded post? @since 4.4.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4148
- →public is_feed($feeds = "") -> bool
Is the query for a feed? @since 3.1.0 @param string|array $feeds Optional feed types to check. @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3828
- →public is_front_page() -> bool True, if front of site.
Is the query for the front page of the site? This is for what is displayed at your site's main URL. Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_on_front'. If you set a static page for the front page of your site, this function will return true when viewing that page. Otherwise the same as @see WP_Query::is_home() @since 3.1.0 @return bool True, if front of site. Defined in <ROOT>/wp-includes/class-wp-query.php:3866
- →public is_home() -> bool True if blog view homepage.
Is the query for the blog homepage? This is the page which shows the time based blog content of your site. Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_for_posts'. If you set a static page for the front page of your site, this function will return true only on the page you set as the "Posts page". @see WP_Query::is_front_page() @since 3.1.0 @return bool True if blog view homepage. Defined in <ROOT>/wp-includes/class-wp-query.php:3893
- →public is_main_query() -> bool
Is the query the main query? @since 3.3.0 @global WP_Query $wp_query Global WP_Query instance. @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4161
- →public is_month() -> bool
Is the query for an existing month archive? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3925
- →public is_page($page = "") -> bool Whether the query is for an existing single page.
Is the query for an existing single page? If the $page parameter is specified, this function will additionally check if the query is for one of the pages specified. @see WP_Query::is_single() @see WP_Query::is_singular() @since 3.1.0 @param int|string|array $page Optional. Page ID, title, slug, path, or array of such. Default empty. @return bool Whether the query is for an existing single page. Defined in <ROOT>/wp-includes/class-wp-query.php:3943
- →public is_paged() -> bool
Is the query for paged result and not for the first page? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3985
- →public is_post_type_archive($post_types = "") -> bool
Is the query for an existing post type archive page? @since 3.1.0 @param mixed $post_types Optional. Post type or array of posts types to check against. @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3582
- →public is_preview() -> bool
Is the query for a post or page preview? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3996
- →public is_privacy_policy() -> bool True, if Privacy Policy page.
Is the query for the Privacy Policy page? This is the page which shows the Privacy Policy content of your site. Depends on the site's "Change your Privacy Policy page" Privacy Settings 'wp_page_for_privacy_policy'. This function will return true only on the page you set as the "Privacy Policy page". @since 5.2.0 @return bool True, if Privacy Policy page. Defined in <ROOT>/wp-includes/class-wp-query.php:3910
- →public is_robots() -> bool
Is the query for the robots file? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4007
- →public is_search() -> bool
Is the query for a search? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4018
- →public is_single($post = "") -> bool Whether the query is for an existing single post.
Is the query for an existing single post? Works for any post type excluding pages. If the $post parameter is specified, this function will additionally check if the query is for one of the Posts specified. @see WP_Query::is_page() @see WP_Query::is_singular() @since 3.1.0 @param int|string|array $post Optional. Post ID, title, slug, path, or array of such. Default empty. @return bool Whether the query is for an existing single post. Defined in <ROOT>/wp-includes/class-wp-query.php:4038
- →public is_singular($post_types = "") -> bool Whether the query is for an existing single post of any of the given post types.
Is the query for an existing single post of any post type (post, attachment, page, custom post types)? If the $post_types parameter is specified, this function will additionally check if the query is for one of the Posts Types specified. @see WP_Query::is_page() @see WP_Query::is_single() @since 3.1.0 @param string|array $post_types Optional. Post type or array of post types. Default empty. @return bool Whether the query is for an existing single post of any of the given post types. Defined in <ROOT>/wp-includes/class-wp-query.php:4087
- →public is_tag($tag = "") -> bool
Is the query for an existing tag archive page? If the $tag parameter is specified, this function will additionally check if the query is for one of the tags specified. @since 3.1.0 @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs. @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:3708
- →public is_tax($taxonomy = "", $term = "") -> bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
Is the query for an existing custom taxonomy archive page? If the $taxonomy parameter is specified, this function will additionally check if the query is for that specific $taxonomy. If the $term parameter is specified in addition to the $taxonomy parameter, this function will additionally check if the query is for one of the terms specified. @since 3.1.0 @global array $wp_taxonomies @param mixed $taxonomy Optional. Taxonomy slug or slugs. @param mixed $term Optional. Term ID, name, slug or array of Term IDs, names, and slugs. @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives). Defined in <ROOT>/wp-includes/class-wp-query.php:3750
- →public is_time() -> bool
Is the query for a specific time? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4104
- →public is_trackback() -> bool
Is the query for a trackback endpoint call? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4115
- →public is_year() -> bool
Is the query for an existing year archive? @since 3.1.0 @return bool Defined in <ROOT>/wp-includes/class-wp-query.php:4126
- →public lazyload_comment_meta($check, $comment_id) -> mixed
Lazyload comment meta for comments in the loop. @since 4.4.0 @deprecated 4.5.0 See wp_queue_comments_for_comment_meta_lazyload(). @param mixed $check @param int $comment_id @return mixed Defined in <ROOT>/wp-includes/class-wp-query.php:4356
- →public lazyload_term_meta($check, $term_id) -> mixed
Lazyload term meta for posts in the loop. @since 4.4.0 @deprecated 4.5.0 See wp_queue_posts_for_term_meta_lazyload(). @param mixed $check @param int $term_id @return mixed Defined in <ROOT>/wp-includes/class-wp-query.php:4341
- →public next_comment() -> WP_Comment Comment object.
Iterate current comment index and return WP_Comment object. @since 2.2.0 @return WP_Comment Comment object. Defined in <ROOT>/wp-includes/class-wp-query.php:3334
- →public next_post() -> WP_Post Next post.
Set up the next post and iterate current post index. @since 1.5.0 @return WP_Post Next post. Defined in <ROOT>/wp-includes/class-wp-query.php:3240
- →public parse_query($query = "")
Parse a query string and set query type booleans. @since 1.5.0 @since 4.2.0 Introduced the ability to order by specific clauses of a `$meta_query`, by passing the clause's array key to `$orderby`. @since 4.4.0 Introduced `$post_name__in` and `$title` parameters. `$s` was updated to support excluded search terms, by prepending a hyphen. @since 4.5.0 Removed the `$comments_popup` parameter. Introduced the `$comment_status` and `$ping_status` parameters. Introduced `RAND(x)` syntax for `$orderby`, which allows an integer seed value to random sorts. @since 4.6.0 Added 'post_name__in' support for `$orderby`. Introduced the `$lazy_load_term_meta` argument. @since 4.9.0 Introduced the `$comment_count` parameter. @since 5.1.0 Introduced the `$meta_compare_key` parameter. @param string|array $query { Optional. Array or string of Query parameters. @type int $attachment_id Attachment post ID. Used for 'attachment' post_type. @type int|string $author Author ID, or comma-separated list of IDs. @type string $author_name User 'user_nicename'. @type array $author__in An array of author IDs to query from. @type array $author__not_in An array of author IDs not to query from. @type bool $cache_results Whether to cache post information. Default true. @type int|string $cat Category ID or comma-separated list of IDs (this or any children). @type array $category__and An array of category IDs (AND in). @type array $category__in An array of category IDs (OR in, no children). @type array $category__not_in An array of category IDs (NOT in). @type string $category_name Use category slug (not name, this or any children). @type array|int $comment_count Filter results by comment count. Provide an integer to match comment count exactly. Provide an array with integer 'value' and 'compare' operator ('=', '!=', '>', '>=', '<', '<=' ) to compare against comment_count in a specific way. @type string $comment_status Comment status. @type int $comments_per_page The number of comments to return per page. Default 'comments_per_page' option. @type array $date_query An associative array of WP_Date_Query arguments. See WP_Date_Query::__construct(). @type int $day Day of the month. Default empty. Accepts numbers 1-31. @type bool $exact Whether to search by exact keyword. Default false. @type string|array $fields Which fields to return. Single field or all fields (string), or array of fields. 'id=>parent' uses 'id' and 'post_parent'. Default all fields. Accepts 'ids', 'id=>parent'. @type int $hour Hour of the day. Default empty. Accepts numbers 0-23. @type int|bool $ignore_sticky_posts Whether to ignore sticky posts or not. Setting this to false excludes stickies from 'post__in'. Accepts 1|true, 0|false. Default 0|false. @type int $m Combination YearMonth. Accepts any four-digit year and month numbers 1-12. Default empty. @type string $meta_compare Comparison operator to test the 'meta_value'. @type string $meta_compare_key Comparison operator to test the 'meta_key'. @type string $meta_key Custom field key. @type array $meta_query An associative array of WP_Meta_Query arguments. See WP_Meta_Query. @type string $meta_value Custom field value. @type int $meta_value_num Custom field value number. @type int $menu_order The menu order of the posts. @type int $monthnum The two-digit month. Default empty. Accepts numbers 1-12. @type string $name Post slug. @type bool $nopaging Show all posts (true) or paginate (false). Default false. @type bool $no_found_rows Whether to skip counting the total rows found. Enabling can improve performance. Default false. @type int $offset The number of posts to offset before retrieval. @type string $order Designates ascending or descending order of posts. Default 'DESC'. Accepts 'ASC', 'DESC'. @type string|array $orderby Sort retrieved posts by parameter. One or more options may be passed. To use 'meta_value', or 'meta_value_num', 'meta_key=keyname' must be also be defined. To sort by a specific `$meta_query` clause, use that clause's array key. Accepts 'none', 'name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'relevance', 'RAND(x)' (where 'x' is an integer seed value), 'comment_count', 'meta_value', 'meta_value_num', 'post__in', 'post_name__in', 'post_parent__in', and the array keys of `$meta_query`. Default is 'date', except when a search is being performed, when the default is 'relevance'. @type int $p Post ID. @type int $page Show the number of posts that would show up on page X of a static front page. @type int $paged The number of the current page. @type int $page_id Page ID. @type string $pagename Page slug. @type string $perm Show posts if user has the appropriate capability. @type string $ping_status Ping status. @type array $post__in An array of post IDs to retrieve, sticky posts will be included @type string $post_mime_type The mime type of the post. Used for 'attachment' post_type. @type array $post__not_in An array of post IDs not to retrieve. Note: a string of comma- separated IDs will NOT work. @type int $post_parent Page ID to retrieve child pages for. Use 0 to only retrieve top-level pages. @type array $post_parent__in An array containing parent page IDs to query child pages from. @type array $post_parent__not_in An array containing parent page IDs not to query child pages from. @type string|array $post_type A post type slug (string) or array of post type slugs. Default 'any' if using 'tax_query'. @type string|array $post_status A post status (string) or array of post statuses. @type int $posts_per_page The number of posts to query for. Use -1 to request all posts. @type int $posts_per_archive_page The number of posts to query for by archive page. Overrides 'posts_per_page' when is_archive(), or is_search() are true. @type array $post_name__in An array of post slugs that results must match. @type string $s Search keyword(s). Prepending a term with a hyphen will exclude posts matching that term. Eg, 'pillow -sofa' will return posts containing 'pillow' but not 'sofa'. The character used for exclusion can be modified using the the 'wp_query_search_exclusion_prefix' filter. @type int $second Second of the minute. Default empty. Accepts numbers 0-60. @type bool $sentence Whether to search by phrase. Default false. @type bool $suppress_filters Whether to suppress filters. Default false. @type string $tag Tag slug. Comma-separated (either), Plus-separated (all). @type array $tag__and An array of tag ids (AND in). @type array $tag__in An array of tag ids (OR in). @type array $tag__not_in An array of tag ids (NOT in). @type int $tag_id Tag id or comma-separated list of IDs. @type array $tag_slug__and An array of tag slugs (AND in). @type array $tag_slug__in An array of tag slugs (OR in). unless 'ignore_sticky_posts' is true. Note: a string of comma-separated IDs will NOT work. @type array $tax_query An associative array of WP_Tax_Query arguments. See WP_Tax_Query->queries. @type string $title Post title. @type bool $update_post_meta_cache Whether to update the post meta cache. Default true. @type bool $update_post_term_cache Whether to update the post term cache. Default true. @type bool $lazy_load_term_meta Whether to lazy-load term meta. Setting to false will disable cache priming for term meta, so that each get_term_meta() call will hit the database. Defaults to the value of `$update_post_term_cache`. @type int $w The week number of the year. Default empty. Accepts numbers 0-53. @type int $year The four-digit year. Default empty. Accepts any four-digit year. } Defined in <ROOT>/wp-includes/class-wp-query.php:731
- →public parse_query_vars()
Reparse the query vars. @since 1.5.0 Defined in <ROOT>/wp-includes/class-wp-query.php:517
- →public parse_tax_query(&$q)
Parses various taxonomy related query vars. For BC, this method is not marked as protected. See [28987]. @since 3.1.0 @param array $q The query variables. Passed by reference. Defined in <ROOT>/wp-includes/class-wp-query.php:1079
- →public query($query) -> WP_Post[]|int[] Array of post objects or post IDs.
Sets up the WordPress query by parsing query string. @since 1.5.0 @param string|array $query URL query string or array of query arguments. @return WP_Post[]|int[] Array of post objects or post IDs. Defined in <ROOT>/wp-includes/class-wp-query.php:3401
- →public reset_postdata()
After looping through a nested query, this function restores the $post global to the current post in this query. @since 3.7.0 @global WP_Post $post Defined in <ROOT>/wp-includes/class-wp-query.php:4324
- →public rewind_comments()
Rewind the comments, resets the comment index and comment to first. @since 2.2.0 Defined in <ROOT>/wp-includes/class-wp-query.php:3386
- →public rewind_posts()
Rewind the posts and reset post index. @since 1.5.0 Defined in <ROOT>/wp-includes/class-wp-query.php:3320
- →public set($query_var, $value)
Set query variable. @since 1.5.0 @param string $query_var Query variable key. @param mixed $value Query variable value. Defined in <ROOT>/wp-includes/class-wp-query.php:1723
- →public set_404()
Sets the 404 property and saves whether query is feed. @since 2.0.0 Defined in <ROOT>/wp-includes/class-wp-query.php:1688
- →public setup_postdata($post) -> true True when finished.
Set up global post data. @since 4.1.0 @since 4.4.0 Added the ability to pass a post ID to `$post`. @global int $id @global WP_User $authordata @global string|int|bool $currentday @global string|int|bool $currentmonth @global int $page @global array $pages @global int $multipage @global int $more @global int $numpages @param WP_Post|object|int $post WP_Post instance or Post ID/object. @return true True when finished. Defined in <ROOT>/wp-includes/class-wp-query.php:4185
- →public the_comment()
Sets up the current comment. @since 2.2.0 @global WP_Comment $comment Current comment. Defined in <ROOT>/wp-includes/class-wp-query.php:3347
- →public the_post()
Sets up the current post. Retrieves the next post, sets up the post, sets the 'in the loop' property to true. @since 1.5.0 @global WP_Post $post Defined in <ROOT>/wp-includes/class-wp-query.php:3258
- →protected get_search_stopwords() -> array Stopwords.
Retrieve stopwords used when parsing search terms. @since 3.7.0 @return array Stopwords. Defined in <ROOT>/wp-includes/class-wp-query.php:1440
- →protected parse_order($order) -> string The sanitized 'order' query variable.
Parse an 'order' query variable and cast it to ASC or DESC as necessary. @since 4.0.0 @param string $order The 'order' query variable. @return string The sanitized 'order' query variable. Defined in <ROOT>/wp-includes/class-wp-query.php:1671
- →protected parse_orderby($orderby) -> string|false Table-prefixed value to used in the ORDER clause. False otherwise.
Converts the given orderby alias (if allowed) to a properly-prefixed value. @since 4.0.0 @global wpdb $wpdb WordPress database abstraction object. @param string $orderby Alias for the field to order by. @return string|false Table-prefixed value to used in the ORDER clause. False otherwise. Defined in <ROOT>/wp-includes/class-wp-query.php:1543
- →protected parse_search(&$q) -> string WHERE clause.
Generates SQL for the WHERE clause based on passed search terms. @since 3.7.0 @global wpdb $wpdb WordPress database abstraction object. @param array $q Query variables. @return string WHERE clause. Defined in <ROOT>/wp-includes/class-wp-query.php:1318
- →protected parse_search_order(&$q) -> string ORDER BY clause.
Generates SQL for the ORDER BY condition based on passed search terms. @since 3.7.0 @global wpdb $wpdb WordPress database abstraction object. @param array $q Query variables. @return string ORDER BY clause. Defined in <ROOT>/wp-includes/class-wp-query.php:1486
- →protected parse_search_terms($terms) -> array Terms that are not stopwords.
Check if the terms are suitable for searching. Uses an array of stopwords (terms) that are excluded from the separate term matching when searching for posts. The list of English stopwords is the approximate search engines list, and is translatable. @since 3.7.0 @param string[] $terms Array of terms to check. @return array Terms that are not stopwords. Defined in <ROOT>/wp-includes/class-wp-query.php:1404
- →private init_query_flags()
Resets query flags to false. The query flags are what page info WordPress was able to figure out. @since 2.0.0 Defined in <ROOT>/wp-includes/class-wp-query.php:455
- →private set_found_posts($q, $limits)
Set up the amount of found posts and the number of pages (if limit clause was used) for the current query. @since 3.5.0 @param array $q Query variables. @param string $limits LIMIT clauses of the query. Defined in <ROOT>/wp-includes/class-wp-query.php:3188