Last active
February 11, 2020 13:40
-
-
Save Pebblo/b5c02263e30ddc4298c1 to your computer and use it in GitHub Desktop.
People add-on, don't display links for expired or sold out events on a persons page, place this file within a child theme (preferred) or within /wp-content/uploads/espresso/templates/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template file to add extra content to a single person display | |
* Note: To customize, just copy the template from /public/templates/* and put in your theme folder. | |
* @since 1.0.0 | |
* @package EE People Addon | |
* @subpackage template | |
* @author Darren Ethier | |
*/ | |
global $post; | |
$events = EEH_People_View::get_events_for_person(); | |
?> | |
<div class="eea-people-addon-person-events-container"> | |
<h3><?php _e('Events this person is involved with:', 'event_espresso'); ?></h3> | |
<?php foreach ( $events as $type => $event ) : ?> | |
<div class="eea-people-addon-people-type-container"> | |
<h4 class="eea-people-addon-people-type-label"><?php echo $type; ?></h4> | |
<ul class="eea-people-addon-event-list-ul"> | |
<?php foreach ( $event as $evt ) : ?> | |
<?php | |
if ( ($evt->is_active() || $evt->is_upcoming()) && ! $evt->is_sold_out() ) : | |
?> | |
<li> | |
<a class="eea-people-addon-link-to-event" href="<?php echo get_permalink( $evt->ID() ); ?>" title="<?php printf( __('Click here to view more info about %s', 'event_espresso' ), $evt->name() ); ?>"><span class="eea-people-addon-event-name"><?php echo $evt->name(); ?></span></a> | |
</li> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
</ul> | |
</div> | |
<?php endforeach; ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment