Adding Categories to a WordPress Custom Post Type? olatechproFebruary 12, 20232 Views Is it possible to add categories to a Custom Post Type in WordPress? Post Views: 2 Related postsGet rid of this Strict Standards warningWooCommerce: get_current_screen not working with multi languageCan’t login on WordPressForce HTTPS using .htaccess – stuck in redirect loopWordPress: Ajax not working to insert, query and result dataHow Can I pass an image file to wp_handle_upload?
Put the following in your theme’s functions.php file (changing my-custom-post-type to be whatever your Custom Post Type is, of course): register_taxonomy_for_object_type('category','my-custom-post-type'); Log in to Reply
I found this link to be helpful with the full function call and hooks to target, it even mentions the distinction between if the custom post type was created by a plugin: http://pippinsplugins.com/add-already-registered-taxonomy/ Log in to Reply
Put the following in your theme’s
functions.php
file (changingmy-custom-post-type
to be whatever your Custom Post Type is, of course):I found this link to be helpful with the full function call and hooks to target, it even mentions the distinction between if the custom post type was created by a plugin: http://pippinsplugins.com/add-already-registered-taxonomy/