Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1361029

    RocketBox
    Participant

    Hi,

    I’m trying to remove the addons and cornerstone menu slugs from the dashboard for a specifi user.
    I’ve menaged to remove all the menu items I need, except the Addons and Cornerstone ones.

    Can you give me the correct menu slug code?

    As an example i’ve removed the revslider menu like so:

    remove_menu_page( ‘revslider’ );

    I just need the correct code for the addons and Cornerstone menu items and I’m all sorted. I’ve tried various combinations but it’s not working for those 2 plugins that use the ‘ admin.php?page= … ‘ method

    Can you help?
    thanks

    #1361090

    Thai
    Moderator

    Hi There,

    Please try with this code:

    remove_menu_page('x-addons-home')

    Hope it helps 🙂

    #1361115

    RocketBox
    Participant

    Hi
    Thanks for reply
    I already tried that, but it dosen’t work 🙁

    I tried both;

    remove_menu_page(‘x-addons-home’)
    remove_menu_page(‘cornerstone-home’)

    also tried without the ‘home’ but neither way works

    ( I need both addons and cornerstone)

    Any other suggestions?

    Thanks

    #1361154

    RocketBox
    Participant

    Hi,

    OK I’ve managed to fix the Addons and Cornerstone ones, I needed to put a high priority in to make it work, 999

    One last thing. I’m also trying to remove just ONE submenu page of a plugin admin menu. which menu slug is:
    admin.php?page=gwolle-gb%2Fsettings.php

    Can you tell me how to write that, using the same method? I’ve tried a few variations including this:

    remove_submenu_page( ‘admin.php’, ‘gwolle-gb/gwolle-gb.php’ );

    but it is not working.

    I’d really appreciate it.

    Thanks

    #1361279

    Lely
    Moderator

    Hi There,

    It will depend on the plugin admin slug. Since I don’t know the plugin you were supposed to remove, let’s use Woocommerce as an example. See this:http://screencast-o-matic.com/watch/cbnioa6eQC To remove Coupons submenu from Woocommerce, we will use this code:

    add_action( 'admin_menu', 'remove_admin_submenus', 999 );
    function remove_admin_submenus() {
    	remove_submenu_page( 'woocommerce', 'edit.php?post_type=shop_coupon' );
    }

    See how I used woocommerce as first parameter and the link for the coupon as second parameter.

    Hope this helps.

    #1361315

    RocketBox
    Participant

    Hi Thanks for that

    The URL for the subpage is:
    admin.php?page=gwolle-gb/settings.php

    and the name of the plugin is ‘Guestbook’ in the admin menu, but could also be ‘gwolle-gb’ (as per plugins folder)
    so i tried both:

    remove_submenu_page( ‘Guestbook’, ‘admin.php?page=gwolle-gb/settings.php’ );
    remove_submenu_page( ‘gwolle-gb’, ‘admin.php?page=gwolle-gb/settings.php’ );

    But neither has worked 🙁
    The difference in your example is that it uses the ‘post_type=…’ and mine has a ‘page=…’ so perhaps I’ve done it wrong?

    Stratching my head now, anything jump out at you?

    Really appreciate your help.
    Thanks

    #1362196

    Friech
    Moderator

    Hi There,

    Regretfully, we cannot provide support for third party plugins due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

    Thank you for your understanding.