Restrict front end for specific user role

Home Forums Calendar Products Community Events Restrict front end for specific user role

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1235269
    ben06
    Participant

    Hi,

    is it possible to restrict the front end for specific user roles (Editor/Superuser)? The community settings only apply to the admin interface. I’m using Ultimate Member to but as far as I know it is not possible to restrict slugs. Thanks for your efforts.

    Best regards,

    Benjamin

    #1235570
    Geoff
    Member

    Howdy Benjamin,

    Thanks for getting in touch and welcome to the forums!

    I think there are two ways you could approach this.

    The first is to use a plugin like Restrict Content. That plugin gives you a shortcode, which you could add to the Community Events submission form template.

    Another way would be to add a conditional statement to the Community Events submission form template that checks whether a person is a logged in before displaying the content. Something like:

    <?php
    if ( is_user_logged_in() ) {
    echo 'Sorry, you are not allowed to view this page.';
    } else {
    // The template code
    }
    ?>

    Does this make sense and will it help get you started? Please let me know. 🙂

    Cheers!
    Geoff

    #1251790
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Restrict front end for specific user role’ is closed to new replies.