Hide Events submenu

Home Forums Calendar Products Events Calendar PRO Hide Events submenu

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #157910
    Andrew
    Participant

    Hello,
    To give my client a simpler “Events” menu, I need to hide the unused “Tags” and “Event Add-ons” items from the left-hand WP admin menu. WP provides the remove_submenu_page() API to hide menu items but I cannot determine the right parameters. I would be grateful for any advise about tribe menu parameters for this function call.

    #158521
    Casey D
    Member

    Hello saintjo,

    Thanks for contacting us. I believe this code is what you are looking for https://gist.github.com/michael-cannon/6701832

    I tested it out and here is the exact code that will do what you want

    function tw_remove_menu_pages() {
    remove_submenu_page( ‘edit.php?post_type=tribe_events’, ‘edit-tags.php?taxonomy=post_tag&post_type=tribe_events’ );
    remove_submenu_page( ‘edit.php?post_type=tribe_events’, ‘tribe-app-shop’ );
    }

    add_action( ‘admin_menu’, ‘tw_remove_menu_pages’, 999 );

    Does this make sense? Let me know if this doesn’t work for you.

    Cheers!

    – Casey Driscoll

    #158562
    Andrew
    Participant

    Casey,
    Thank you so much for the quick reply and “solution”. The tricky part was the submenu SLUG. Both values worked perfectly.
    -Cheers

    #159744
    Casey D
    Member

    Hello saintjo,

    Happy it worked out!

    We’d love it if you would leave us a review and let people know how much you like the plugin! http://m.tri.be/jt

    I’ll go ahead and close this thread. Let us know if we can help with anything else.

    – Casey Driscoll

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide Events submenu’ is closed to new replies.