Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $products = new WP_Query(array(
- 'post_type' => 'products',
- 'post_status' => 'publish',
- 'orderby' => 'date',
- 'posts_per_page' => 3,
- 'paged' => get_query_var('paged'),
- ));
- if ($products->have_posts()) : while ($products->have_posts()) : $products->the_post(); ?>
- <div class="post">
- <?php if (has_post_thumbnail()) { ?>
- <a class="thumb" href="<?php the_permalink(); ?>">
- <?php the_post_thumbnail(); ?>
- </a>
- <?php } ?>
- <div class="info">
- <time datetime="<?php echo get_the_date('Y-m-d'); ?>"> | <?php echo get_the_date('F d,Y'); ?></time>
- <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
- </div>
- </div>
- <?php endwhile; endif; wp_reset_query(); ?>
Add Comment
Please, Sign In to add comment