Original reproduced: http://tencent.yundashi168.com/900.html
background
When I used wodpress to build websites for testing, I installed a wordpress theme, and when I enabled it, my wordpress background became like this. Many menus have disappeared, including articles, plug-ins, settings, users, and so on.
Well, as the station master of the old bird, of course, it's up to you to solve it.
Solution:
Find functions for the theme. PHP file, locate the core code:
function dameiti_remove_menus() { O5e252aae('remove_menu_page',O5e252aae(-7, 'plugins.php' )) ; O5e252aae('remove_menu_page',O5e252aae(-7, 'edit.php' )) ; O5e252aae('remove_menu_page',O5e252aae(-7, 'upload.php' )) ; O5e252aae('remove_menu_page',O5e252aae(-7, 'edit.php?post_type=page' )) ; O5e252aae('remove_menu_page',O5e252aae(-7, 'edit-comments.php' )) ; O5e252aae('remove_menu_page',O5e252aae(-7, 'users.php' )) ; O5e252aae('remove_menu_page',O5e252aae(-7, 'tools.php' )) ; O5e252aae('remove_menu_page',O5e252aae(-7, 'options-general.php' )) ; }
Comment out all the above code, save it, and then wordpress refreshes the background, and you can see that the disappeared menus are back.
function dameiti_remove_menus() { // O5e252aae('remove_menu_page',O5e252aae(-7, 'plugins.php' )) ; // O5e252aae('remove_menu_page',O5e252aae(-7, 'edit.php' )) ; // O5e252aae('remove_menu_page',O5e252aae(-7, 'upload.php' )) ; // O5e252aae('remove_menu_page',O5e252aae(-7, 'edit.php?post_type=page' )) ; // O5e252aae('remove_menu_page',O5e252aae(-7, 'edit-comments.php' )) ; // O5e252aae('remove_menu_page',O5e252aae(-7, 'users.php' )) ; // O5e252aae('remove_menu_page',O5e252aae(-7, 'tools.php' )) ; // O5e252aae('remove_menu_page',O5e252aae(-7, 'options-general.php' )) ; }
WordPress background hides unwanted menus:
During WordPress development, when you install plug-ins or use skin, the left menu bar sometimes shows some menus that are not very nice, or some menus that we don't need, such as Install Demo for skin, Catalogue under the article.
No plug-ins used, using two functions remove_menu_page and remove_submenu_page, in function.php adds the following code:
The following image shows the categorized catalog links for the default articles;
add_action('admin_menu', 'remove_menus', 999); function remove_menus(){ remove_menu_page( 'edit.php' ); //Hide post, Level 1 menu remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=category' ); // Hide post's default catalog, wordpress's own catalog, secondary menu remove_menu_page( 'edit.php?post_type=portfolio' ); //Hide Custom type=portfolio, Level 1 Menu remove_submenu_page( 'themes.php', 'install-required-plugins' );// Hide the installation plugins that come with a skin, non-wordpress directories, secondary menus }
Ps: Links are only hidden, and background direct access is still possible;
Some plug-ins can also be used to hide specific menus.
//Remove Background Useless Menus add_action( 'admin_menu', function(){ remove_menu_page( 'index.php' ); //Dashboard remove_menu_page( 'upload.php' ); //Multi-Media remove_menu_page( 'edit.php?post_type=page' ); //page remove_menu_page( 'edit-comments.php' ); //comment remove_menu_page( 'plugins.php' ); //Plug-in unit remove_menu_page( 'tools.php' ); //tool remove_menu_page( 'options-general.php' ); //Set up });
If your wordpress background fixed menu disappears, you can go to the core code "remove_menu_page" and comment out the code to restore the menu.
You need to learn more site-building tutorials, so you can view the following series of tutorials:
If you have a little buddy who doesn't know how to use the pagoda panel, take a look at the series of tutorials I've summarized to ensure that you get older from beginners:
[Science popularization of station building process]
[Summary of selected tutorials on Pagoda Panel]
- Pagoda Panel Tutorial (1) The Pagoda Panel Building on a Cloud Server tutorial is the most detailed
- Pagoda Panel Tutorial (2) Pagoda Panel Add WordPress Site Detailed Text Tutorial
- Pagoda Panel Tutorial (3) Successfully configure a website SSL security certificate based on the pagoda panel
- Pagoda Panel Tutorial (4) Pagoda Panel backs up and restores data for WordPress sites
- Pagoda Panel Tutorial (5) WordPress website programs and databases backed up regularly to Qiniuyun Storage Tutorial
- Pagoda Panel Tutorial (6) WordPress website programs and databases backup regularly to take pictures of cloud storage space tutorial
- Pagoda Panel Tutorial (7) Pagoda Panel Version Upgrade Update Tutorial Summary - Upgrade Pagoda Panel
- Pagoda Panel Tutorial (8) Docker Timely Backup MySQL Database to Qiniuyun Tutorial
- Pagoda Panel Tutorial (9) How to connect pagoda panels to create a complete FTP space tutorial
[FAQ Summary of Pagoda Panel]