Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clean_journal_archive_content_image() {
- $options = clean_journal_get_theme_options();
- $featured_image = $options['content_layout'];
- if ( has_post_thumbnail() && 'full-content' != $featured_image ) { ?>
- <figure class="featured-image">
- <a rel="bookmark" href="<?php the_permalink(); ?>">
- <?php
- if ( 'excerpt-image-left' == $featured_image || 'excerpt-image-right' == $featured_image ) {
- the_post_thumbnail( 'clean-journal-landscape' );
- }
- elseif ( 'excerpt-image-top' == $featured_image ) {
- the_post_thumbnail( 'clean-journal-featured' );
- }
- elseif ( 'excerpt-full-image' == $featured_image ) {
- the_post_thumbnail( 'full' );
- }
- ?>
- </a>
- <?php if (get_post(get_post_thumbnail_id())->post_excerpt) { // search for if the image has caption added on it ?>
- <span class="featured-image-caption">
- <?php echo wp_kses_post(get_post(get_post_thumbnail_id())->post_excerpt); // displays the image caption ?>
- </span>
- <?php } ?>
- </figure>
- <?php
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment