Current Path : /var/test/www/ya/wp-content/themes/youthy/post-formats/ |
Current File : /var/test/www/ya/wp-content/themes/youthy/post-formats/blog-item.php |
<?php // Set post class $post_class = 'blog-item'; // Get theme options for more button... $blog_more_button = get_theme_mod ( 'blog_more_button' , '' ); ?> <article <?php post_class( $post_class ); ?> id="post-<?php the_ID(); ?>"> <?php if ( is_sticky() && !is_single() ) { ?> <span class="featured"><i class="fa fa-star"></i></span> <?php } ?> <?php if ( has_post_thumbnail() ) { $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'basic' ); ?> <div class="blog-image"<?php if ( has_post_thumbnail() ) { ?> style="background-image: url( <?php echo esc_url( $image[0] ); ?>);"<?php } ?>> <a href="<?php esc_url( the_permalink() ); ?>" title="<?php the_title(); ?>"> <?php the_post_thumbnail('basic'); ?> </a> </div> <?php } ?> <div class="blog-summary"> <a href="<?php esc_url( the_permalink() ); ?>" title="<?php the_title(); ?>"><h2 class="post-title entry-title"> <?php the_title(); ?> </h2> <time class="post-date updated" datetime="<?php the_time('Y-m-d', '', ''); ?>"><?php the_time( get_option( 'date_format' )); ?></time></a> <div class="blog-excerpt"><p><?php echo substr( get_the_excerpt(), 0, 90 ); ?>...</p></div> <?php if ( $blog_more_button !== "1" ) { ?> <a class="btn small" href="<?php esc_url( the_permalink() ); ?>" title="<?php the_title(); ?>"><?php echo esc_attr( get_theme_mod( 'content_more' , __( 'More' , 'meanthemes' ) ) ); ?> <i class="fa fa-arrow-right"></i></a> <?php } ?> </div> </article>