I use the Options Tree. Just to use a Meta Box only. And I do not use his Theme Options.
In the picture below, how to throw Theme Options menu? Is it possible?
I use the Options Tree. Just to use a Meta Box only. And I do not use his Theme Options.
In the picture below, how to throw Theme Options menu? Is it possible?
Share Improve this question edited Jul 15, 2014 at 17:15 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Jul 9, 2014 at 22:13 YudiYudi 333 silver badges9 bronze badges2 Answers
Reset to default 4This can be removed using remove_submenu_page
function. Put following codes in your functions.php
function remove_ot_menu () {
remove_submenu_page( 'themes.php', 'ot-theme-options' );
}
add_action( 'admin_init', 'remove_ot_menu' );
/**
* Option Tree Files
* Including Files and setting up Option Tree
*
* @Since 1.0.0
* Version 1.0.0
*/
if(class_exists('OT_Loader' )):
//Filter for option tree settings
add_filter( 'ot_show_pages', '__return_false' );
add_filter( 'ot_show_new_layout', '__return_false' );
add_filter( 'ot_post_formats', '__return_true');
add_filter( 'ot_use_theme_options', '__return_false' ); //This filter removes theme options page.
endif;
The code above is helpful to remove custom Theme options page from Option Tree, make sure you add this in functions.php