Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (has_post_thumbnail()) {
- if(function_exists('get_wp_lazy_loading_blank_image')){
- $post_thumbnail_id = get_post_thumbnail_id( get_the_ID() );
- $image_attributes = wp_get_attachment_image_src( $post_thumbnail_id );
- }
- ?>
- <?php if (get_current_template() == 'template-blog3.php') { ?>
- <div class="full-width-image hover-image">
- <a href="<?php the_permalink(); ?>">
- <?php if(function_exists('get_wp_lazy_loading_blank_image')){
- $default_attr = array(
- 'src' => get_wp_lazy_loading_blank_image(),
- 'class' => 'attachment-showcase-image wp-post-image lazy',
- 'data-original' => $image_attributes[0]
- );
- the_post_thumbnail('showcase-image', $default_attr);
- ?>
- <?php } else {
- the_post_thumbnail('showcase-image');
- }
- ?>
- </a>
- </div>
- <?php } else { ?>
- <div class="main-post-image hover-image">
- <a href="<?php the_permalink(); ?>">
- <?php if(function_exists('get_wp_lazy_loading_blank_image')){
- $default_attr = array(
- 'src' => get_wp_lazy_loading_blank_image(),
- 'class' => 'attachment-thumb-image wp-post-image lazy',
- 'data-original' => $image_attributes[0]
- );
- the_post_thumbnail('thumb-image', $default_attr);
- ?>
- <?php } else {
- the_post_thumbnail('thumb-image');
- }
- ?>
- </a>
- </div>
- <?php } ?>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement