Created
March 25, 2019 20:43
-
-
Save TanvirAmi/802a68e42411ba35f23cedb250c38d8b 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
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php hybrid_attr( 'post' ); ?>> | |
<?php truereview_post_thumbnail(); ?> | |
<div class="entry-wrapper"> | |
<header class="entry-header"> | |
<?php the_title( sprintf( '<h2 class="entry-title" ' . hybrid_get_attr( 'entry-title' ) . '><a href="%s" rel="bookmark" itemprop="url">', esc_url( get_permalink() ) ), '</a></h2>' ); ?> | |
</header> | |
<div class="entry-meta"> | |
<?php | |
// Get the review score | |
$type = get_post_meta( get_the_ID(), 'tj_review_type', true ); | |
$review = get_post_meta( get_the_ID(), 'tj_review_feature', true ); | |
$avg = truereview_review_avg( array( 'type' => $type, 'count' => $review, 'progressbar' => true ) ); | |
if ( $avg ) : | |
?> | |
<span class="post-review"> | |
<span class="review-score"> | |
<span class="bar" style="width: <?php echo intval( $avg ) . '%'; ?>"></span> | |
</span> | |
</span> | |
<?php endif; ?> | |
<time class="entry-date published" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" <?php hybrid_attr( 'entry-published' ); ?>><a href="<?php the_permalink(); ?>"><?php echo esc_html( get_the_date() ); ?></a></time> | |
<span class="entry-author author vcard" <?php hybrid_attr( 'entry-author' ) ?>><?php printf( esc_html__( 'By %s', 'truereview' ), '<a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" itemprop="url"><span itemprop="name">' . esc_html( get_the_author() ) . '</span></a>' ); ?></span> | |
</div> | |
<div class="entry-summary" <?php hybrid_attr( 'entry-summary' ); ?>> | |
<?php the_excerpt(); ?> | |
</div> | |
<?php truereview_entry_publisher(); ?> | |
</div> | |
</article><!-- #post-## --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment