Category Box in Custom post type
-
Hi,
How can I category box or meta box on this section
Reference: https://www.awesomescreenshot.com/image/36880635?key=ac88146dfe5f5d67bac1df8f9e7ebfc3
I already have a code added in my custom post type also appears in the dashboard admin.
Reference:https://www.awesomescreenshot.com/image/36880422?key=a574e66a7d830e33a0f55f2ac6575f06My codes:
add_action( 'init', 'create_blog_taxonomies', 0 ); function create_blog_taxonomies() { $labels = array( 'name' => _x( 'Categories', 'taxonomy general name' ), 'singular_name' => _x( 'Category', 'taxonomy singular name' ), 'search_items' => __( 'Search Categories' ), 'all_items' => __( 'All Categories' ), 'parent_item' => __( 'Parent Category' ), 'parent_item_colon' => __( 'Parent Category:' ), 'edit_item' => __( 'Edit Category' ), 'update_item' => __( 'Update Category' ), 'add_new_item' => __( 'Add New Category' ), 'new_item_name' => __( 'New Category Name' ), 'menu_name' => __( 'Categories' ), ); $args = array( 'hierarchical' => true, // Set this to 'false' for non-hierarchical taxonomy (like tags) 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'show_in_quick_edit' => false, 'rewrite' => array( 'slug' => __( 'blog-category', 'blog' ) ), ); register_taxonomy( 'blog-category', array( 'blog' ), $args ); }
That codes work with my custom post type however the box or meta box where I can add a category in a post not showing on adding a post like this
Reference: https://loom.com/i/a1eb766ca9034df0a626cc6b3f78b944Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Category Box in Custom post type’ is closed to new replies.