I have been able to register a new post type. 'code' and now I would like to display it. I added
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( is_home() )
$query->set( 'post_type', array( 'post', 'page', 'album', 'movie', 'quote', 'code', 'attachment' ) );
return $query;
}
but this makes it show with other blog posts. I want a new page that only displays 'code' posts. I created a file single-code.php but I dont think this is correct. How do I create a new page that just shows code posts?
myblog.com/?post_type=code. Then you can customize the look witharchive-code.php. See codex.wordpress.org/Template_Hierarchy – Tom Auger Aug 15 '12 at 15:40