最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to hide the menu item created by the theme in WordPress admin panel?

programmeradmin4浏览0评论

I installed the flatsome theme and it created a menu in the admin panel. I wanted to hide it because it is redundant to Appearance menu that is already in the dashboard. How will I possibly hide the menu item on the sidebar and on the top bar?

Here is an screenshot.

I installed the flatsome theme and it created a menu in the admin panel. I wanted to hide it because it is redundant to Appearance menu that is already in the dashboard. How will I possibly hide the menu item on the sidebar and on the top bar?

Here is an screenshot.

Share Improve this question edited May 26, 2017 at 23:48 Johansson 15.4k11 gold badges43 silver badges79 bronze badges asked May 26, 2017 at 23:31 user2513128user2513128 11 bronze badge 1
  • Hi, welcome to WPSE. Can you please specify it's slug, css classes, etc? We don't even know what we're dealing with if you don't provide more information. – Johansson Commented May 26, 2017 at 23:48
Add a comment  | 

2 Answers 2

Reset to default 1
  1. As a temporary solution, add below script to the function.php file
wp_enqueue_style( 'flatsome-hide', get_stylesheet_directory_uri() . '/css/flatsome.css', array('flatsome'), '1.0' );

Crete a CSS file called "flatsome" inside your CSS directory, or whatever you prefer, make sure you update the name and the path on function.php. Then inspect the menu class and hide it using display: none

  1. The second method, use a filter in fuction.php

function custom_menu_page_removing() {
    remove_menu_page( $menu_slug );
}
add_action( 'admin_menu', 'your-MENU' );

https://codex.wordpress/Function_Reference/remove_menu_page

You should ask support from flatsome .They have a active facebook group https://www.facebook/groups/flatsome/ . You should ask your question there.

发布评论

评论列表(0)

  1. 暂无评论