I’m trying to add the categories selector to the “page” editor workspace. The code below does the trick, however, none of the values are saved with the page.
Any help much appreciated!
add_action('admin_menu', 'my_post_categories_meta_box');
function my_post_categories_meta_box() {
add_meta_box('categorydiv', __('Categories'),
'post_categories_meta_box', 'page', 'side', 'core');
}
You’ll need to register the
category
taxonomy for the pagepost_type
withregister_taxonomy_for_object_type
.This does the trick: