Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created September 15, 2020 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/782a834950be643e10f961c520214933 to your computer and use it in GitHub Desktop.
Save lorenzocaum/782a834950be643e10f961c520214933 to your computer and use it in GitHub Desktop.
global $post;
$events = EEH_People_View::get_events_for_person();
?>

<style type="text/css">
 div.entry-content p, header.entry-header {
	display:none;
 }

 div.entry-content > center:first-child img{
	display:none;
}
</style>

<div class="eea-people-addon-person-events-container">

	<div class="event-top">
		<div class="event-ticket">
			<?php 
			echo genesis_do_post_title();
			
			$id_people = get_the_ID();
			$value = get_field( "field_586a28f9d6446", $id_people );

			if( $value == 1) {
				echo '</br>';
				echo do_shortcode('[tools-devis-form-html]');
			}
			?>
		</div>
		<div class="event-image">
			<center style="margin-top: 25px;"><?php the_post_thumbnail('medium'); ?></center>
		</div>	
	</div>
	
	<h4 id="anchor-workshops-creates" class="compte-presentation">Sa biographie</h4>	
	<?php echo get_the_content();?>
	
	<?php if ( $events ) : ?>
	</br>
	<h4 id="anchor-workshops-creates" class="compte-presentation">Ses ateliers</h4>	
	<?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> -->
			<?php foreach ( $event as $evt ) : 
				
					/* Categorie pour extraire ville*/
					$terms = get_the_terms($evt->ID() , 'espresso_event_categories' );
					if ($terms && ! is_wp_error($terms)) :
						$term_slugs_arr = array();
						foreach ($terms as $term) {
							if ($term->term_id > 71 ) {
							$term_slugs_arr[] = $term->slug;
							}
						}
						$terms_slug_str = join( " - ", $term_slugs_arr);				
						$terms_slug_str .= " ";
					endif;
				?>
				
				<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 class="categoryatelier"><?php echo $terms_slug_str?></span></span></a>
				</li>
			<?php endforeach; ?>
		</div>
	<?php endforeach; ?>
	<?php endif; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment