Hi!
I’m trying to use this code:
add_action( ‘admin_menu’, ‘my_remove_meta_boxes’ );
function my_remove_meta_boxes() {
remove_meta_box( ‘wpdmcategorydiv’, ‘wpdmpro’, ‘side’ );
add_meta_box(‘wpdmcategorydiv’, __(‘NEW TITLE’), ‘wpdmpro_categories_meta_box’, ‘wpdmpro’, ‘normal’, ‘high’);
}
But what are the callback functions for the category and tags metaboxes for your custom post type?
None of these work:
wpdmpro_categories_meta_box
wpdm_categories_meta_box
wpdmprocategories_meta_box
Thanks!~
Do you want to modify the labels for Category and Tags? Use the register_taxonomy_args
filter to modify these labels.
For example adding the following code in functions.php file will change the category labels,
function wpdm_custom_taxonomy_args( $args, $taxonomy, $object_type ) { if ( $taxonomy == "wpdmcategory" ) { $labels = array( 'name' ► __( "Folders" , "download-manager" ), 'singular_name' ► __( "Folder" , "download-manager" ), 'search_items' ► __( "Search Folders" , "download-manager" ), 'all_items' ► __( "All Folders" , "download-manager" ), 'parent_item' ► __( "Parent Folder" , "download-manager" ), 'parent_item_colon' ► __( "Parent Folder:" , "download-manager" ), 'edit_item' ► __( "Edit Folder" , "download-manager" ), 'update_item' ► __( "Update Folder" , "download-manager" ), 'add_new_item' ► __( "Add New Folder" , "download-manager" ), 'new_item_name' ► __( "New Folder Name" , "download-manager" ), 'menu_name' ► __( "Folders" , "download-manager" ), ); $args['labels'] = $labels; } return $args; } add_filter( 'register_taxonomy_args', 'wpdm_custom_taxonomy_args', 10, 3 );
This is a huge help, thank you!!!
The topic ‘Callback function for Category and Tags metaboxes in admin?’ is closed to new replies.