Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112726

Matt on "Categories in Custom Post Type Loop/List"

$
0
0

This is my entire setup for my custom post type. The custom categories display in the WP admin panel as they should, but trying to get them to show on any template file is simply not working... I've read all docs and links that you've sent and then some.

/*** Custom Posts ***/	

add_action("init", "portfolio_init");

function portfolio_init() {

register_taxonomy(
    'works',
    'portfolio',
    array(
        'label' => __('Portfolio Categories'),
        'singular_label' => __('Portfolio Category'),
        'hierarchical' => true,
        'query_var' => true,
        'rewrite' => true,
        'show_in_nav_menus' => true,
    )
);

// took out author and custom fields
register_post_type('portfolio', array(
        'label' => __('Portfolio'),
        'singular_label' => __('Work'),
        'public' => true,
        'show_ui' => true,
        'hierarchical' => false,
        'rewrite' => true,
        'query_var' => true,
        'show_in_nav_menus' => true,
        'menu_position' => 3,
        'supports' => array('title', 'editor', 'thumbnail'),
        '_builtin' => false, // It's a custom post type, not built in!
));

}

Viewing all articles
Browse latest Browse all 112726

Trending Articles