WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to hide option of template from the menu side in wp-admin.

I tried this code but its not work , its no hide the option:-

//hide in admin menu
add_action( 'admin_menu', 'wpse121406_hide_pages_comments_m' );
function wpse121406_hide_pages_comments_m() {

and try this and not work:-

function remove_menus(){
  remove_menu_page( 'options-general.php' );        //Settings
add_action( 'admin_menu', 'remove_menus' );

So what can i do to hide this link :-

share|improve this question

In this case, the issue is due to the queue order. You should change the priority of the execution of your add_action hook to something large, to ensure that it executes as late as possible. add_action's 3rd argument is the priority represented by an integer. Lower #'s gain priority in execution over higher #'s.

add_action( 'admin_menu', 'remove_menus', 999999 );

It's likely that the theme you're trying to hide the options page for doesn't have it's execution priority that low and therefore the hook will have been created before your add action argument is fired.

share|improve this answer
i will do that but still found in menu – user3133976 Jan 11 '14 at 11:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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