• Resolved tommyleyland

    (@tommyleyland)


    To put a long story short, I’m trying to get the custom post type category to show where it says ‘project-item’ as you can see HERE

    I presume it has something to do with the way I’ve registered the custom post type such as in this code:

    <?php
    add_action( 'init', 'register_posts' );
    function register_posts() {
    
        register_post_type( 'team_post',
            array(
                'labels' => array(
                    'name' => __( "Team" ,"um_lang"),
                    'singular_name' => __( "Team" ,"um_lang")
                ),
                'public' => true,
                'has_archive' => true,
                'rewrite' => array('slug' => "project_item", 'with_front' => TRUE),
                'supports' => array('title','editor','thumbnail','page-attributes')
            )
        );
    
        register_post_type( 'project_post',
            array(
                'labels' => array(
                    'name' => __( "Projects","um_lang"),
                    'singular_name' => __( "Project" ,"um_lang")
                ),
                'public' => true,
                'has_archive' => true,
                'rewrite' => array('slug' => "project_item", 'with_front' => TRUE),
                'supports' => array('title','editor','thumbnail','page-attributes')
            )
        );
    
        register_taxonomy('project_category',array (
          0 => 'project_post',
        ),array( 'hierarchical' => true, 'label' => __('Projects Category',"um_lang"),'show_ui' => true,'query_var' => true,'singular_label' => __('Projects Category',"um_lang")) );
    
    }
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Type Slug Rewrite Issues’ is closed to new replies.