When option tree is installed the page "theme options" show under appearance. I want to bring it to top level menu item. i did a deep search and so far I found is:


filter to change the parent slug that currently defaults to themes.php.

But I dont know how to do this. Any instruction would be nice.

1 Answer 1


Add this to your functions.php file -

add_filter('ot_theme_options_parent_slug', '__return_false');

Basically it's a filter (ot_theme_options_parent_slug) added by the plugin author and the usage is simple like I provided here. You may consider looking at this page for all available filters for "Option-Tree" plugin - https://github.com/valendesigns/option-tree/blob/master/includes/ot-functions-admin.php By adding this filter, you can pass any function and adjust the UI according to you. Like add_filter('filter_name', 'your_function_name');

Then define the function and do what you like to do - function(your_function_name){//do whatever you like to do}

Btw, (ot_theme_options_parent_slug) this returns default slug of themes.php So by returning is false, it will go to main menu system of wordpress. You may also adjust the position of it by adding additional filter available.

  • Please add an explanation to your answer: why could that solve the problem?
    – fuxia
    Commented Jan 11, 2015 at 12:09
  • Please edit your answer. Comment content is ignored by our site search.
    – fuxia
    Commented Jan 12, 2015 at 13:32

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.