0

I've made a custom post type "Artwork" with CPT UI. In the settings of my CPT, I enabled access to these taxonomies "Categories" and "Section Categories".

When I view my post list, I not only see a column "Categories", but also a column "Section Category". See screenshot.

But where can I assign a section category? There is no taxonomy for section categories. Do I have to create a custom taxonomy and give it a certain name to make it act as "Section Categories"?

I couldn't find any information online...

EDIT: Here's a screenshot that hopefully explains my problem in a better was.

enter image description here

1 Answer 1

0

If you would like to add taxonomy other than default, you need to create another one by using register_taxonomy() Because by default, only category and post_tag are created and associated to post.

Add the following code in functions.php

// 'post' is the post type name that you want to associate this new taxonomy to.
function q363839_create_new_tax() {
    $args = array(
    // please refer to the link above and add your settings here according to the need
    );
    register_taxonomy( 'section_category', 'post', $args );
}
add_action( 'init', 'q363839_create_new_tax' );

If in case you are creating taxonomy using plugin in. Make sure you choose the following value to true so that it will appear in your custom post type eg. Artwork Admin Column

Show Admin Column - True

enter image description here

Edited: About the theme interference I suddenly have an idea on how to solve the problem that is being created by the theme. You may try to

  1. search the code for register_taxonomy(), see what is the name of the taxonomies
  2. unregister it by unregister_taxonomy()
  3. create your taxonomy in CPT UI

OR

The best, you contact the theme author because the author for assistance knows it the best and will be the support for you.

Then you could be free from interference of the theme provided that you are sure that after removing the taxonomy from the theme will not break your templates. If it break, then you just go to Screen Options to hide the default taxonomy and use your own one.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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