Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // if post format
- <div class="col-md-12">
- <?php
- // the query
- $ic_post_format = new WP_Query( array(
- 'posts_per_page' => 4,
- 'post_type' => 'post',
- ));
- if( $ic_post_format->have_posts() ): while ( $ic_post_format->have_posts() ) : $ic_post_format->the_post();
- // get_template_part( 'template-parts/feature_content', 'post', get_post_format() );
- $format = get_post_format() ? : 'standard';
- if ( $format == 'aside' ) : ?>
- <?php get_template_part( 'template-parts/feature_content', 'post', get_post_format() ); ?>
- <?php else: ?>
- <div class="ic-card">
- <div class="media">
- <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('hpost'); ?></a>
- <div class="media-body">
- <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?> </a></h3>
- <span class="ic-cat"><a href="<?php the_permalink(); ?>"><?php the_category(' , ') ?> </a> / <?php echo date('j F Y'); ?></span>
- <?php the_excerpt(); ?>
- </div>
- </div>
- </div>
- <?php endif;
- endwhile;
- else :
- echo wpautop( 'Sorry, no posts were found' );
- endif;
- wp_reset_query();
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement