Is there a way to remove the Add New Event link?

WordPress Event Management, Calendars & Registration Forums Frontend Submissions Is there a way to remove the Add New Event link?

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 7 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23616

    Is there a way to remove the ‘Add New’ link for logged in users in the dashboard? Logged in users see the Event Organiser dashboard through WordPress showing the above link. Is it possible to exclude that link?

    I have the FES and that is a nice, clean professional way for Event Organisers to make submissions. The link they can see once logged in allows them to do the same, but it looks so untidy, and undermines the FES.

    I have tried setting the permissions in EO, but the only way to exclude the Add New link excludes everything.

    Chris Hirst
    #23646

    The ‘Add New’ link on the menu and the events admin page should only be visible for users who can ‘create events’. This capability was only introduced in WP 4.5 and Event Organiser doesn’t allow you to configure it. But you could map it to a capability only admins have (for instance).

    See this answer for details: http://stackoverflow.com/a/16675677/932391 (that sets it to false or do_not_allow to prevent anyone from seeing the creating new posts – this shouldn’t effect FES though).

    As for implementing that for Event Organiser:

     add_filter( 'eventorganiser_event_properties', function( $args ) {
          $args['capabilities']['create_posts'] = 'do_not_allow';
          return $args;
     } );
    
    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.