wp query – Apply a custom WP_Query to the whole multisite network
I want to fetch all posts given a certain
That can be done as follows:
$args = array( 'meta_query' => array( array( 'key' => 'langpack_identifier', 'value' => 'whatever' ) ), 'post_type' => 'post', 'posts_per_page' => '10' );
And then using get_posts() or directly creating a new instance of WP_Query. But this will only fetch posts within the current site.
How can I extend the query so that it includes all results for all the sites in the network?