Skip to content

Commit

Permalink
featured images a links (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesros161 authored Sep 12, 2022
1 parent 4e282ef commit 664e1ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion templates/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
'show' === get_theme_mod( 'bgtfw_blog_post_header_feat_image_display' ) &&
has_post_thumbnail() ) : ?>
<div class="featured-image container">
<?php the_post_thumbnail(); ?>
<a class="featured-image-link" href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" title="<?php echo esc_attr( get_the_title( $post->ID ) ); ?>">
<?php the_post_thumbnail(); ?>
</a>
</div>
<?php endif; ?>
<?php endif;?>
Expand Down
4 changes: 3 additions & 1 deletion templates/post-list-header-above.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
*/
?>
<header <?php BoldGrid::add_class( 'entry_header', [ 'entry-header', 'above' ] ); ?>>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?> <?php is_single() ? : bgtfw_featured_img_bg( $post->ID, true ); ?>></div>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?> <?php is_single() ? : bgtfw_featured_img_bg( $post->ID, true ); ?>>
<a class="featured-image-link" href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" title="<?php echo esc_attr( get_the_title( $post->ID ) ); ?>"></a>
</div>
<div>
<?php the_title( sprintf( '<p class="entry-title ' . get_theme_mod( 'bgtfw_blog_post_header_title_size' ) . '"><a ' . BoldGrid::add_class( 'blog_page_post_title', [ 'link' ], false ) . ' href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></p>' ); ?>
<?php if ( 'post' == get_post_type() ) : ?>
Expand Down
4 changes: 3 additions & 1 deletion templates/post-list-header-below.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
</div><!-- .entry-meta -->
<?php endif; ?>
</div>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?> <?php is_single() ? : bgtfw_featured_img_bg( $post->ID, true ); ?>></div>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?> <?php is_single() ? : bgtfw_featured_img_bg( $post->ID, true ); ?>>
<a class="featured-image-link" href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" title="<?php echo esc_attr( get_the_title( $post->ID ) ); ?>"></a>
</div>
</header><!-- .entry-header -->

0 comments on commit 664e1ec

Please sign in to comment.