wordpress remove taxonomy metabox

Solutions on MaxInterview for wordpress remove taxonomy metabox by the best coders in the world

showing results for - "wordpress remove taxonomy metabox"
Marta
25 May 2019
1/*
2If you are manually registering your custom taxonomy via
3register_taxonomy then you can pass in arguments to control where
4the metabox appears.
5
6In the example below setting show_ui to false would completely remove
7the metabox from the edit screen, the quick edit screen, and the admin
8menu. But if you set show_ui to true you can achieve more nuanced control
9by then using the show_in_quick_edit and meta_box_cb arguments (setting
10the later to false hides the metabox on the CPT edit screen as desired).
11*/
12
13register_taxonomy( 'your_custom_taxonomy', array( 'your_custom_post_type' ), $args );
14$args = array(
15    'show_ui'                    => true,
16    'show_in_quick_edit'         => false,
17    'meta_box_cb'                => false,
18);
19