partials/content-excerpt.php
<?php
/**
* Template part for displaying post archives and search results
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Go
*/
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php if ( is_singular() && has_post_thumbnail() ) : ?>
<div class="post__thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail(); ?>
</a>
</div>
<?php endif; ?>
<header class="entry-header m-auto px">
<?php
if ( is_sticky() && is_home() && ! is_paged() ) {
printf( '<span class="sticky-post">%s</span>', esc_html_x( 'Featured', 'post', 'go' ) );
}
if ( is_singular() ) :
the_title( '<h1 class="post__title entry-title m-0">', '</h1>' );
else :
the_title( sprintf( '<h2 class="post__title entry-title m-0"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
endif;
Go\post_meta( get_the_ID(), 'top' );
?>
</header>
<div class="<?php Go\content_wrapper_class( 'content-area__wrapper' ); ?>">
<div class="content-area entry-content">
<?php the_excerpt(); ?>
</div>
</div>
</article>