Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- get_header('topbar'); ?>
- <div class="blog_container">
- <h2 class="blog-title">Latest News</h2>
- <p>News information and much more.</p>
- </div>
- <?php
- // the query
- $the_query = new WP_Query(array(
- 'category_name' => 'my-category-slug',
- 'post_status' => 'publish',
- 'posts_per_page' => 6,
- ));
- ?>
- <?php if ($the_query->have_posts()) : ?>
- <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
- <?php the_category(', '); ?>
- <?php the_title(); ?>
- <?php the_excerpt(); ?>
- <?php the_post_thumbnail(); ?>
- <?php the_content(); ?>
- <div class="container bloglist">
- <div class="blog_list_outter">
- <div class="blog_author">
- <div class="author_image"><?php echo get_avatar( get_the_author_meta('ID'), 60); ?></div>
- </div>
- <div class="post-grid">
- <h2 class="blog_heading"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <div class="category_title">
- <div class="category__list__card">
- <p class="cat"><?php echo get_the_category_list(', '); ?></p>
- </div>
- <div class="post__stamp">
- <?php the_time('F j, Y'); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php
- endwhile;
- wp_reset_postdata();
- endif;
- get_footer();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement