Hot answers tagged

2

I am not familiar with the plugin, but it seems unlikely that the $conditions array you're adding to should contain any variety of WordPress query arguments. Further, referencing the $conditions array within a property that you're setting on that very array won't contain the new data you've added, but rather the array as it existed before your additions ...


2

Inside get_posts() method of the WP_Query class (line 3769), you will find out this filter: $this->posts = apply_filters_ref_array( 'the_posts', array( $this->posts, &$this ) ); It's the very first hook you can use to modify queried posts on both back-end and front-end. $this->posts is an array of queried posts so it's easy to modify the ...



Only top voted, non community-wiki answers of a minimum length are eligible