0

For internal purpose I created taxonomy named "CLIENT" for the "PAGES" post .

It's generated a widget in pages (picture below).

I use ACF to manages my client categories (I create a specific field) so i want to remove or hide this widget for all my users role by adding code to my function.php

any idea?

Thanks.

enter image description here

2
  • so i want to remove or hide this widget for all my users role Do you mean you wish to remove this box from the edit page screen for all users, or for any user other than the admin?
    – hwl
    Commented Aug 1, 2017 at 13:44
  • From the edit page screen for all users
    – Samuel
    Commented Aug 1, 2017 at 14:12

1 Answer 1

1

In your register_taxonomy() args, set meta_box_cb => false

'meta_box_cb' (bool|callable) Provide a callback function for the meta box display. If not set, post_categories_meta_box() is used for hierarchical taxonomies, and post_tags_meta_box() is used for non-hierarchical. If false, no meta box is shown.

$args = array(
               //other args 
               'meta_box_cb' => false,
                );

register_taxonomy( $args );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.