This question already has an answer here:

I wonder if there is any way to show all post types in the same table of posts.

Let's say I've got 3 different post types: Movies, Books and Videogames.

Is there any way to show them all in a single table of posts?

marked as duplicate by brasofilo, tfrommen, fuxia Oct 7 '13 at 8:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Yes of course, if you set the query argument 'post_type' to 'any', it will retrieve any type except revisions and types with 'exclude_from_search' set to true.


$all_posts = get_posts( array( 'post_type' => 'any' ) );

Otherwise, if you don't want ALL post types, just certain ones:

$specific_posts = get_posts( array( 'post_type' => array( 'movies', 'books', 'videogames' ) ) );

Source: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters

Not the answer you're looking for? Browse other questions tagged or ask your own question.