Site icon Nabtron

Theme options not showing after WordPress 4.0 update

There have been various changes in WordPress 4.0 (and now WordPress 4.1) and many themes options might have gone from the dashboard for users! Lets see how to get them back.

Theme options not available after WordPress 4.0 update

When I updated one of my WordPress sites from WP 3.9 to 4.0, the theme options in the left menu under appearance disappeared! Definitely there was some change in the hooks and codes for WordPress with the new release.

Lets see how to fix this themes options hidden after WordPress upgrade issue.

How to fix Theme options not visible after WordPress update to 4.0

The issue was simple, in the functions.php (or theme-options.php or any other files which contain code to add theme page to the left side admin menu) the hook being used was deprecated.

The old one was:

edit_themes

So we need to change it to the new one for the theme options to be visible:

edit_theme_options

For complete code example, look at the following and change from:

add_theme_page($themename." Theme Options", $themename. " Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');

to:

add_theme_page($themename." Theme Options", $themename. " Theme Options", 'edit_theme_options', basename(__FILE__), 'mytheme_admin');

Let me know if it solves the issue for you or if you still have it and can’t see the WordPress theme options in admin panel when logged in as administrator.

 

Exit mobile version