Created
March 26, 2018 10:32
-
-
Save MjHead/3c69415471caf96dd7fb5bead6cdbf82 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 | |
/** | |
* Post item template | |
*/ | |
global $post; | |
$terms = get_the_terms( $post->ID, 'category' ); | |
$terms_classes = ''; | |
if ( ! empty( $terms ) ) { | |
foreach ( $terms as $term ) { | |
$terms_classes .= ' category-' . $term->slug; | |
} | |
} | |
?> | |
<div class="jet-smart-tiles<?php echo $terms_classes; ?>"> | |
<div class="jet-smart-tiles__box" <?php $this->__get_post_bg_attr(); ?>> | |
<?php $this->__post_terms(); ?> | |
<div class="jet-smart-tiles__box-content"> | |
<div class="jet-smart-tiles__box-content-inner"> | |
<?php include $this->__get_global_template( 'post-meta' ); ?> | |
<?php $this->__render_meta( 'title_related', 'jet-title-fields', array( 'before' ) ); ?> | |
<?php the_title( '<div class="jet-smart-tiles__box-title">', '</div>' ); ?> | |
<?php $this->__render_meta( 'title_related', 'jet-title-fields', array( 'after' ) ); ?> | |
<?php $this->__render_meta( 'content_related', 'jet-content-fields', array( 'before' ) ); ?> | |
<?php $this->__post_excerpt( '<div class="jet-smart-tiles__box-excerpt">', '</div>' ); ?> | |
<?php $this->__render_meta( 'content_related', 'jet-content-fields', array( 'after' ) ); ?> | |
</div> | |
</div> | |
<a href="<?php the_permalink(); ?>" class="jet-smart-tiles__box-link"></a> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment