Want to display your WordPress site’s custom posts on the default homepage blogroll or on the page you set to be the default blog page?
This requires making a conditional statement in your functions.php regarding is_home().
1 2 3 4 5 6 7 8 9 |
add_filter( 'pre_get_posts', 'my_get_posts' ); function my_get_posts( $query ) { if ( is_home() && $query->is_main_query() ) $query->set( 'post_type', array( 'post', 'page', 'album', 'movie', 'quote' ) ); return $query; } |
http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page