How do I modify the network query posts to include all post types?

I wanted to see if someone can give me guidance on how to modify the main query for all the multisite plugins so that it includes all post types?

Here's the query:
$network_query = network_query_posts( array( 'post_type' => $posttype, 'posts_per_page' => $number ));

  • jakelisby
    • Design Lord, Child of Thor

    Is there someone we could loop in to assist? I've literally ripped apart the post indexer trying to figure out the answer to this. I've also looked through all the post feed plugins and widgets. If I can figure this out, it solves my problem across all the plugins/widgets that I'm trying to use...

  • jakelisby
    • Design Lord, Child of Thor

    Posting back a resolution in case someone else comes across this question and needs an answer.

    (This is using the 3.0 RC 1 version of the Post Indexer)

    In our example we have 2 additional custom post types, so I wanted to add video and gallery post types into the feed. Here's the code I used. You could also add a call to get all custom post types and add them into the feed, but I know what mine are called.

    $posttype = array('post', 'video', 'gallery');
    		$network_query = network_query_posts( array( 'post_type' => $posttype, 'posts_per_page' => $number ));
  • jakelisby
    • Design Lord, Child of Thor

    Needing to reopen because there's something funky happening. Basically the query I included above will get all the posts for all post types. Although, when I add in a variable for a specific post type, for example video, it doesn't return any results. It will only allow me to include one post type variable and that is post, any custom post types won't display. Are there any thoughts on how to get these others to display individually?

    Here's an example of the code:

    $posttype = $_GET['posttype'];
    			if(empty($posttype)) {
    				$posttype = array('post', 'video', 'gallery');
    			}
    		$network_query = network_query_posts( array( 'post_type' => $posttype, 'posts_per_page' => $number ));

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.