• Resolved khartley

    (@khartley)


    I was advised to get Memberpress in order to hide events from the public so only certain users can gain access. However even though my event is listed as having limited access anyone who goes to the event page can see the event. I’m unsure what I have done wrong. I’ve gone to the events page in a private browser and I am still able to view the event.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jean A

    (@jeanabarquez)

    Hi @khartley ,

    Thanks for writing in.

    I have reviewed your “WOCEC Session 2: Developing a Stress-free, Inclusive Environment for Your Team” event and found that only the event description and tickets block have been hidden from view. This may happen if a shortcode is used to hide the content.

    I recommend following this guide on how to restrict access to the entire event page instead of just partial content. This will ensure that the event details are fully protected.

    Please let us know if you need further assistance with this issue.

    Best regards,
    Jean

    Thread Starter khartley

    (@khartley)

    Thank you for responding @jeanabarquez .

    I am not using any shortcode to hide content and I do not want to hide the entire events page as other non members will need to see some of the general events. I would just like to hide events with the tag ‘WOCEC’ from the public eye. Which I thought was the point of using Memberpress to make certain events private.

    These are the event settings I have set up below, from my understanding only members in this list should be able to access this content.

    I hope to gain a better understanding of what it means to have a ‘protected event’

    Thank you.

    Jean A

    (@jeanabarquez)

    Hi @khartley,

    Thank you for clarifying your question, and I now understand what you mean.

    As you mentioned, MemberPress restricts access to event content, but I don’t think it has a built-in feature to hide events from the calendar itself.

    To achieve this functionality, you have to apply the following snippet to your functions.php file:

    add_filter( 'tribe_events_views_v2_view_repository_args', 'tec_exclude_events_tags', 10, 3 );
     
    function tec_exclude_events_tags( $repository_args, $context, $view ) {
      // List of tag slugs to be excluded
      $excluded_tags = [
        'wocec',
      ];
     
    	if ( !is_user_logged_in() ) {
    		$repository_args['tag_not_in'] = $excluded_tags;
    	}
    	
    	return $repository_args;
    	
    }

    Please make sure to use the actual slug of the tag you want to exclude from the public calendar. Here’s the complete guide for your reference.

    I hope this helps! Let me know if that works for you.

    Kind regards,
    Jean

    Plugin Support Darian

    (@d0153)

    Hi @khartley

    This thread has been inactive for a while, so we’ll go ahead and mark it Resolved. Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Memberpress and Private Events’ is closed to new replies.