3

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?

Remove Visual Composer tab from Dashboard menu

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.

5

UPDATE: Due to the hook change from 'admin_menu' to 'admin_init' the new code is:

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-general'); //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:

The link for Visual-Composer main page is admin.php?page=vc-general if you want to hide a link from an plugin in the admin backend, simply use everything behind the ?page= in this case it's vc-general

No need for an additional plugin.

  • 1
    Very useful information well explained! – Luckyfella Aug 31 '17 at 5:17
2

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' );
  • Thank you for the information, I've updated my answer, 'cause it's the accepted one so people can find it fast. Kudos for you. – marvinpoo Oct 13 '17 at 9:24
1

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!

1

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' );
0

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' );

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