apply_filters_ref_array( "posts_join", string $join, WP_Query $query )

Filters the JOIN clause of the query.

Parameters

$join

string

The JOIN clause of the query.

$query

WP_Query

The WP_Query instance (passed by reference).

Source

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

View all references

$join = apply_filters_ref_array( "posts_join", array( $join, &$this ) );

More Information

When you use the wp_query object to run a query, not all tables are queried by default. For example, a query on the blog archive will only query the posts table. If you wanted to display posts that have specific meta value you will have to alter the wp_query object to include the required meta key.

Leave a Reply

Your email address will not be published. Required fields are marked *