0

I'm trying to add a custom taxonomy to default category taxonomy but I could not figure out how to.

I tried this but failed :/

register_taxonomy(
    'oyuncu',
    'category',
    array(
        'hierarchical' => false,
        'label' => __('Oyuncular', 'series'),
        'query_var' => 'oyuncu',
        'rewrite' => array('slug' => 'oyuncular'),
        'show_ui'           => true,
        'supports' => array('thumbnail'),
    )
);
9
  • What are you trying to achieve? You can't assign a taxonomy to a taxonomy. You may only assign it to a post type. But you could use metadata (custom fields) to relate two different taxonomies.
    – Sally CJ
    Commented Feb 26, 2020 at 18:02
  • @SallyCJ I'm trying to struct cast ( actors ) to category ( tv-serie ) Commented Feb 26, 2020 at 21:12
  • What is actors? A post type? And is tv-serie a term in the standard category taxonomy? Or is tv-serie a custom taxonomy?
    – Sally CJ
    Commented Feb 27, 2020 at 11:56
  • @SallyCJ actors are taxonomy with hierarchical => false. tv-serie is the standard category not custom one. Commented Feb 28, 2020 at 11:59
  • 1
    @SallyCJ that makes sense, I will try that. Thank you for helping :) Commented Feb 29, 2020 at 11:37

0

Your Answer

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

Browse other questions tagged or ask your own question.