Last active
December 26, 2015 21:39
-
-
Save hansent/7217557 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 $events_loop = new WP_Query( array('post_type' => 'events', 'posts_per_page' => '0', 'orderby' => 'ASC' ) ); ?> | |
<?php while ( $events_loop->have_posts() ) : $events_loop->the_post(); ?> | |
<?php $feat_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'mediumsize' ); ?> | |
<?php | |
$locations_list = wp_get_post_terms($post->ID, 'locations', array("fields" => "slugs")); | |
$occurences_list = wp_get_post_terms($post->ID, 'occurences', array("fields" => "slugs")); | |
$disciplines_list = wp_get_post_terms($post->ID, 'disciplines', array("fields" => "slugs")); | |
$cls_name = $post->post_name; | |
$cls_locations = join(" ", $locations_list); | |
$cls_occurences = join(" ", $occurences_list); | |
$cls_disciplines = join(" ", $disciplines_list); | |
?> | |
<div class="event <?php echo "$cls_name $cls_locations $cls_occurences $cls_disciplines" ?>"> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment