admin管理员组

文章数量:1291008

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 7 years ago.

Improve this question

I have installed Visual Composer for a client and am now trying to remove the tab from the Dashboard menu. How can I do this?

function remove_menus(){

    remove_menu_page( ‘js_composer.php’ );      

}

add_action( ‘admin_menu’, ‘remove_menus’ );

The code used above isn't working for me. It seems the path "js_composer.php" is not correct.

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 7 years ago.

Improve this question

I have installed Visual Composer for a client and am now trying to remove the tab from the Dashboard menu. How can I do this?

function remove_menus(){

    remove_menu_page( ‘js_composer.php’ );      

}

add_action( ‘admin_menu’, ‘remove_menus’ );

The code used above isn't working for me. It seems the path "js_composer.php" is not correct.

Share Improve this question asked May 23, 2016 at 17:38 cpcdevcpcdev 3872 gold badges4 silver badges19 bronze badges
Add a comment  | 

5 Answers 5

Reset to default 7

It is not easy to find it out, but it is pretty easy if you know how.

Add this following code to your themes functions.php.

function custom_menu_page_removing() {
    remove_menu_page('vc-welcome'); //vc
}
add_action( 'admin_init', 'custom_menu_page_removing' );

(Previously been admin_menu, now is admin_init)

This is how to find out for the next time:

If you want to hide a link from any plugin in the admin backend, simply use everything behind the ?page= in this example case it's vc-welcome

No need for an additional plugin to remove/hide the link.

I use version 4.12.1 and this code works for me. Hide from user menu but not for admin menu.

function custom_menu_page_removing() {
    remove_menu_page('vc-welcome'); //vc
}
add_action( 'admin_menu', 'custom_menu_page_removing' );

The previous answers did not work for me. I realized that I had to change the hook to admin_init.

function custom_menu_page_removing() {
    remove_menu_page('vc-welcome');
}
add_action( 'admin_init', 'custom_menu_page_removing' );

I solved this by installing the Admin Menu Editor plugin which gave me the ability to manually remove the Visual Composer dashboard tab. Good plugin!

This code worked out for me on the latest Wordpress

function custom_menu_page_removing() {
    remove_menu_page('vc-welcome');
}
add_action( 'admin_init', 'custom_menu_page_removing' );

本文标签: Remove Visual Composer Tab from Dashboard Menu