<?php /** * Template part for displaying posts (summary view for archives, blog index) * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package Red_Velvet_Renders */ ?><article id="post-<?php the_ID(); ?>" <?php post_class('archive-entry-item'); // Matches styling of .update-item ?>> <header class="entry-header"> <?php if ( is_sticky() && is_home() && ! is_paged() ) { printf( '<span class="sticky-post" style="display:block; font-weight:bold; color: #ff6b6b; margin-bottom: 0.5rem;">%s</span>', esc_html_x( 'Featured', 'post', 'redvelvetrenders' ) ); }the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?> <div class="entry-meta"> <?php echo get_the_date(); ?> <?php $categories_list = get_the_category_list( esc_html__( ', ', 'redvelvetrenders' ) ); if ( $categories_list && !is_category() ) { // Don't show categories if already on a category archive printf( ' | <span class="cat-links">' . esc_html__('In %s', 'redvelvetrenders') . '</span>', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?> </div><!-- .entry-meta --> </header><!-- .entry-header --><?php if ( has_post_thumbnail() ) : ?> <div class="post-thumbnail" style="margin-bottom: 1rem; text-align: center;"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('medium_large'); ?> </a> </div><!-- .post-thumbnail --> <?php endif; ?><div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --><footer class="entry-footer" style="margin-top: 1rem;"> <a href="<?php the_permalink(); ?>" class="read-more-button"> <?php esc_html_e( 'Read More', 'redvelvetrenders' ); ?> <span class="screen-reader-text"> <?php esc_html_e( 'about ', 'redvelvetrenders' ); the_title(); ?></span> &raquo; </a> </footer><!-- .entry-footer --> </article><!-- #post-<?php the_ID(); ?> --> <?php /** * Template part for displaying posts (summary view for archives, blog index) * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package Red_Velvet_Renders */ ?><article id="post-<?php the_ID(); ?>" <?php post_class('archive-entry-item'); // Matches styling of .update-item ?>> <header class="entry-header"> <?php if ( is_sticky() && is_home() && ! is_paged() ) { printf( '<span class="sticky-post" style="display:block; font-weight:bold; color: #ff6b6b; margin-bottom: 0.5rem;">%s</span>', esc_html_x( 'Featured', 'post', 'redvelvetrenders' ) ); }the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?> <div class="entry-meta"> <?php echo get_the_date(); ?> <?php $categories_list = get_the_category_list( esc_html__( ', ', 'redvelvetrenders' ) ); if ( $categories_list && !is_category() ) { // Don't show categories if already on a category archive printf( ' | <span class="cat-links">' . esc_html__('In %s', 'redvelvetrenders') . '</span>', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?> </div><!-- .entry-meta --> </header><!-- .entry-header --><?php if ( has_post_thumbnail() ) : ?> <div class="post-thumbnail" style="margin-bottom: 1rem; text-align: center;"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('medium_large'); ?> </a> </div><!-- .post-thumbnail --> <?php endif; ?><div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --><footer class="entry-footer" style="margin-top: 1rem;"> <a href="<?php the_permalink(); ?>" class="read-more-button"> <?php esc_html_e( 'Read More', 'redvelvetrenders' ); ?> <span class="screen-reader-text"> <?php esc_html_e( 'about ', 'redvelvetrenders' ); the_title(); ?></span> &raquo; </a> </footer><!-- .entry-footer --> </article><!-- #post-<?php the_ID(); ?> -->