Skip to content

Instantly share code, notes, and snippets.

@TanvirAmi
Created July 19, 2017 00:26
Show Gist options
  • Save TanvirAmi/ac09adc78327f2b3458c39f569a27fe1 to your computer and use it in GitHub Desktop.
Save TanvirAmi/ac09adc78327f2b3458c39f569a27fe1 to your computer and use it in GitHub Desktop.
<article id="post-<?php the_ID(); ?>" <?php post_class( 'archive' ); ?>>
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
<span class="entry-author vcard">
<?php printf( esc_html__( 'by %s', 'featured' ), '<a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a>' ); ?>
</span>
<div class="post-thumbnail thumbnail">
<?php featured_archive_thumbnail(); ?>
<?php
$category = get_the_category( get_the_ID() );
if ( $category ) :
?>
<span class="cat-links">
<a href="<?php echo esc_url( get_category_link( $category[0]->term_id ) ); ?>"><?php echo esc_attr( $category[0]->name ); ?></a>
</span>
<?php endif; // End if category ?>
</div>
</article><!-- #post-## -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment