• Hi –

    I’ve creating tumblr style custom post types for video, photo, quote etc.,

    How do I use my default post categories for them, as the different post types could be appearing in the same category?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You might want to look at Post_Formats first.

    Thread Starter markoburns

    (@markoburns)

    no , I need other custom types as well. Post formats is too limited.

    I think i found it –
    'taxonomies' => array('category')

    added to register_post_type

    Thread Starter markoburns

    (@markoburns)

    Any idea how I get the custom post types to appear in archives.php?

    Thread Starter markoburns

    (@markoburns)

    This seems to work for both archives and categories – is this the right way to do this? (It’s in functions.php)

    function my_get_posts( $query ) {
    
    	if ( is_home() || is_category() || is_archive() && false == $query->query_vars['suppress_filters'] )
    		$query->set( 'post_type', array( 'post', 'quotes' ) );
    
    	return $query;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘custom post types with default categories’ is closed to new replies.