Advertisement
pratikshrestha

Clean Journal Full Content with thumbnail

Feb 15th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1. /**
  2.  * Template for Featured Image in Archive Content
  3.  *
  4.  * Overriding Parent Theme
  5.  *
  6.  * @since Clean Journal Child
  7.  */
  8. function clean_journal_archive_content_image() {
  9.     $options        = clean_journal_get_theme_options();
  10.     $featured_image = $options['content_layout'];
  11.  
  12.     if ( has_post_thumbnail() ) { ?>
  13.         <figure class="featured-image">
  14.             <a rel="bookmark" href="<?php the_permalink(); ?>">
  15.             <?php
  16.                     if ( 'excerpt-image-left' == $featured_image  || 'excerpt-image-right' == $featured_image  ) {
  17.                          the_post_thumbnail( 'clean-journal-landscape' );
  18.                     }
  19.                     elseif ( 'excerpt-image-top' == $featured_image  ) {
  20.                          the_post_thumbnail( 'clean-journal-featured' );
  21.                     }
  22.                     else {
  23.                         the_post_thumbnail( 'full' );
  24.                     }
  25.                 ?>
  26.             </a>
  27.         </figure>
  28.     <?php
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement