WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/parse query

This page is marked as incomplete. You can help Codex by expanding it.

Contents

Description

parse_query is an action triggered after WP_Query->parse_query() has set up query variables (such as the various is_ variables used for conditional tags).

Parameters

A registered action function is passed the following parameters.

$wp_query
(WP_Query) (required) The query object that parsed the query.
Default: None

Usage

add_action('parse_query', 'set_custom_isvars');
function set_custom_isvars( $wp_query ) {
    $wp_query->is_foo = ...
}

Change Log

Source File

Triggered by WP_Query->parse_query() in wp-includes/query.php.

See Also

Query Overview

Related