Can I make the overview of an event public but keep details private?

I need to know if there is a away to show the Overview (such as the title and time of an event) public. But at the same time, I want to keep the details private, such as the address and the poster. Is this possible?

  • Hoang Ngo

    Hi there @Chris,

    I hope you are well today.

    For archive this feature, we will need to modify the code.

    Line 1041 file wp-content/plugins/bp-group-calendar/groupcalendar/bp-group-calendar.php, you will see the code look like this

    <?php if ($event->event_location) : ?>
    	    <h6 class="event-label"><?php _e('Location:', 'groupcalendar'); ?></h6>
      	  <div class="event-location">
    
      	    <?php echo stripslashes($event->event_location); ?>
    
      	  <?php if ($event->event_map) : ?>
        	  <span class="event-map">
        	    <a href="<?php echo $map_url; ?>" target="_blank" title="<?php _e('View Google Map of Event Location', 'groupcalendar'); ?>"><?php _e('Map', 'groupcalendar'); ?> &raquo;</a>
        	  </span>
      	  <?php endif; ?>
    
          </div>
    	  <?php endif; ?>

    Please modify it like this:

    <?php if ($event->event_location) : ?>
    	    <h6 class="event-label"><?php _e('Location:', 'groupcalendar'); ?></h6>
      	  <div class="event-location">
    		  <?php if( is_user_logged_in()): ?>
    
      	    <?php echo stripslashes($event->event_location); ?>
    
      	  <?php if ($event->event_map) : ?>
        	  <span class="event-map">
        	    <a href="<?php echo $map_url; ?>" target="_blank" title="<?php _e('View Google Map of Event Location', 'groupcalendar'); ?>"><?php _e('Map', 'groupcalendar'); ?> &raquo;</a>
        	  </span>
      	  <?php endif; ?>
    			<?php else: ?>
    			  <?php _e('User must be a member to view this information','groupcalendar') ?>
    			<?php endif; ?>
          </div>
    	  <?php endif; ?>

    So this will don't show the location for visitor, and output a message told them to login to see the information.

    If you have any issues please don't hesitate to let us know so we can assist

    Best Regards
    Hoang