0

I have read a lot similar questions, but none of them saves me.

The site have multi-custom post type registered, others are ok to load a single page, except one,

function cabinet_post_type(){
$labels = array(
    'name'                => __('Cabinets'),
    'singular_name'       => __('Cabinet'),
    'menu_name'           => __('Cabinets'),
);

$args = array(
    'description'         => __('Cabinets'),
    'labels'              => $labels,
    'supports'            => array('title', 'editor', 'thumbnail', 'revisions', 'genesis-seo', 'genesis-cpt-archives-settings'),
    'show_in_rest'        => true,
    'public'              => true,
    'hierarchical'        => false,
    'show_ui'             => true,
    'show_in_menu'        => true,
    'show_in_nav_menus'   => true,
    'show_in_admin_bar'   => true,
    'query_var'           => true,
    'menu_icon'           => 'dashicons-editor-ul',
    'has_archive'         => true,
    'can_export'          => true,
    'exclude_from_search' => false,
    'yarpp_support'       => true,
    'publicly_queryable'  => true,
    'capability_type'     => 'page'
);

register_post_type('cabinet', $args);}

I have no cue how that happens, could any big boss figure that out? so many thanks

2
  • Visiti permalinks to flush them. – vancoder Nov 13 '20 at 16:42
  • As @vancoder said you can flush permalinks - Settings > Permalinks > Save – Bysander Nov 23 '20 at 16:52
0

After a long search! I found a simple answer on a similar case. just add this line in the custom post type register

"taxonomies" => [ "category", "product-category" ],

then it will do the magic!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.