Home / author / Add category selection to custom post type
  • La bamba!

  • Nice approach, but i do think instead of writing this somewhat “much” code, the theme developer should just add this line below into the register_post_type function.

    ‘taxonomies’ => array(‘category’)

    • Hi Adedoyin
      Yes this is very true, this is just another method to add taxonomies however I have used this method to limit access to taxonomies editing based on role.

  • Mohamed Ramadan


  • Mail

    Extremely helpful (in my hour of need!)
    Thanks so much for sharing :)

  • Hey there, Thanks for this info. I would like to add categories to my woocommerce products to further structure data and pull products into some category based widgets (i realise products have a “product category” already) Can you tell me what the code should read for Woocommerce custom post product types. I am unsure how to find this out.