WordPress at Your Fingertips
action is not described

pre_get_posts action-hook . WP 2.0.0

Fires after the query variable object is created, but before the actual query is run.

Note: If using conditional tags, use the method versions within the passed instance (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions like is_main_query() test against the global $wp_query instance, not the passed one.


add_action( 'pre_get_posts', 'action_function_name_8090' );
function action_function_name_8090( $query ){
	// action...
The WP_Query instance (passed by reference).


Since 2.0.0 Introduced.

Where the hook is called

wp-includes/class-wp-query.php 1784
do_action_ref_array( 'pre_get_posts', array( &$this ) );

Where in WP core the hook is used WordPress

Usage not found.