Add the categories selector widget to the PAGE editor with predefined categories listed?
- by Scott B
The following code will add the categories selector widget to the WordPress Page editor interface...
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');
}
What I would like to do is to figure out how to modify the resulting category listing so that it only contains a predefined list of hard coded categories that I define.
Since I'm adding this via my custom theme, it will only appear on the page editor when my theme is active on the site. And I have some specific "handler" categories that my theme installs into the site and later uses to determine layout elements.