Tagged: x
-
AuthorPosts
-
February 7, 2017 at 6:20 am #1361029
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?
thanksFebruary 7, 2017 at 7:14 am #1361090Hi There,
Please try with this code:
remove_menu_page('x-addons-home')
Hope it helps 🙂
February 7, 2017 at 7:31 am #1361115Hi
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
February 7, 2017 at 8:10 am #1361154Hi,
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.phpCan 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
February 7, 2017 at 9:38 am #1361279Hi 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.
February 7, 2017 at 9:59 am #1361315Hi Thanks for that
The URL for the subpage is:
admin.php?page=gwolle-gb/settings.phpand 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.
ThanksFebruary 7, 2017 at 8:24 pm #1362196Hi 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.
-
AuthorPosts