• How do I alter WP_Query->posts?
    I have an array of posts $posts and I want to set this array as a post array in my $query->posts
    I have tried:

    $query->set('posts',$posts) ;

    and also

    $query->posts() = $posts;

    None of the above works, in my loop it shows only the original posts of the query.
    Any idea how I can do this?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Alter WP_Query->posts?’ is closed to new replies.