• Resolved gnjang

    (@gnjang)


    $career_story = array(
    
    'labels' => $career_story_label,
    
    'description' => __('career story', 'rsupport'),
    
    'public' => true,
    
    'menu_position' => 95,
    
    'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'page-attributes','revisions'),
    
    'has_archive' => true, // only this is required to enable archive page else 404 error will occur
    
    'publicly_queryable' => true,
    
    'show_ui' => true,
    
    'query_var' => true,
    
    'hierarchical' => false,
    
    'rewrite' => array( 'slug' => 'career/story'),
    
    'menu_icon' => 'dashicons-format-aside',
    
    // 'show_in_menu' => 'rsupport',
    
    'taxonomies' => array('story'),
    
    );
    $args_career_story = array(
    
    'labels' => $taxonomy_labels,
    
    'hierarchical' => true,
    
    'public' => true,
    
    'show_ui' => true,
    
    'show_admin_column' => true,
    
    'show_in_nav_menus' => true,
    
    'show_tagcloud' => true,
    
    'query_var' =>true,
    
    // 'has_archive' => true,
    
    // 'rewrite' => array( 'slug' => 'career/story'),
    
    );

    register_post_type( ‘storys’, $career_story );

    register_taxonomy( ‘story’, ‘storys’, $args_career_story );

    register_taxonomy_for_object_type( ‘story’, ‘storys’ );

    hello. I’m struggling with custom-post configuration. If you create a post after setting custom-post as above,
    The url is properly created, such as https://abi.rsupport.com/ko-kr/career/story/{title}. However, when a category is created and selected, the url of the created category is
    Returned to https://abi.rsupport.com/en-us/story/{category-slug}.

    I want to make it in the format https://abi.rsupport.com/en-us/career/story/{category-slug}/title. Is there something I have not set up correctly??

    Please help me

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom post type & custom taxonomy URI’ is closed to new replies.