Need help? Check out our Support site, then


Custom categories and custom tags in custom post type

  1. Seeking help from all WordPress gurus.
    'm stuck on following error.

    How to display and filter custom categories and custom tags in custom post type?
    I have registered custom post type: register_post_type('portfolio', array(<br /> 'label' => 'Projects',<br /> 'description' => '',<br /> 'public' => true,<br /> 'show_ui' => true,<br /> 'show_in_menu' => true,<br /> 'capability_type' => 'post',<br /> 'hierarchical' => false,<br /> 'rewrite' => array('slug' => 'portfolio'),<br /> 'query_var' => true,<br /> 'has_archive' => true,<br /> 'exclude_from_search' => false,<br /> 'supports' => array('title','editor','excerpt','custom-fields','comments','revisions','thumbnail','author','page-attributes',),<br /> 'labels' => array (<br /> 'name' => 'Projects',<br /> 'singular_name' => 'Project',<br /> 'menu_name' => 'Projects',<br /> 'add_new' => 'Add Project',<br /> 'add_new_item' => 'Add New Project',<br /> 'edit' => 'Edit',<br /> 'edit_item' => 'Edit Project',<br /> 'new_item' => 'New Project',<br /> 'view' => 'View Project',<br /> 'view_item' => 'View Project',<br /> 'search_items' => 'Search Projects',<br /> 'not_found' => 'No Projects Found',<br /> 'not_found_in_trash' => 'No Projects Found in Trash',<br /> 'parent' => 'Parent Project',<br /> ),<br /> )<br /> );
    I have registered custom taxonomies 'cat' and 'tags' (different from blog taxonomies):
    register_taxonomy(<br /> 'cat',<br /> array (0 => 'portfolio',),<br /> array(<br /> 'hierarchical' => true,<br /> 'label' => 'Categories',<br /> 'show_ui' => true,<br /> 'query_var' => true,<br /> 'rewrite' => array('slug' => 'cat'),<br /> 'singular_label' => 'Category'<br /> )<br /> );<br /> register_taxonomy(<br /> 'tags',<br /> array (0 => 'portfolio',),<br /> array(<br /> 'hierarchical' => false,<br /> 'label' => 'Tags',<br /> 'show_ui' => true,<br /> 'query_var' => true,<br /> 'rewrite' => array('slug' => 'tags'),<br /> 'singular_label' => 'Tag'<br /> )<br /> );
    I have page with template file portfolio.php in theme`s page-templates folder.
    I tryed to make custom template pages like: cat.php, portfolio-cat.php, archive-cat.php, archive-portfolio.php, but newer wordpress founds this template, just shows 404 page.
    If i display the_terms( $post->ID, 'cat' , ' ' );, it shows right categories, but linking to blog (domain.com/blog/cat/residental [residental = category]).
    My site uses Multilingual Press Plugin with Network Sites for it.

    I'll appreciate any help
    Thanks.

  2. You are in the wrong forum. These forums are for wordpress.com and we cannot help you here: you need to head over to wordpress.org.
    http://wordpress.org/support/

  3. Thanks

    sorry for wrong section

Topic Closed

This topic has been closed to new replies.

About this Topic