do_action_ref_array( 'pre_get_posts', WP_Query )

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

25 related hooks found for: pre_get_posts

Top ↑

Related terms found for this post

wp-parser-related-wordsclass-wp-query-php, post, posts, pre, wp-includes
wp-parser-packageQuery, WordPress

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • class-wp-query-php
  • post
  • posts
  • pre
  • Query
  • wp-includes
  • wp-includes/class-wp-query.php
  • query

Top ↑

Description Description

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.

Top ↑

Parameters Parameters

(WP_Query) &$this The WP_Query instance (passed by reference).

Top ↑

Source Source

File: wp-includes/class-wp-query.php

View on Trac

Top ↑

Changelog Changelog

Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.