thanks for the links, but
here is the code. still not working. what is wrong with that, please?
<?php
$args = array(
'post_type' => 'post'
);
$post_query = new WP_Query($args);
if($post_query->have_posts() ) {
while($post_query->have_posts() ) {
$post_query->the_post();
?>
<div class="cbp-item">
<div class="news_item shadow">
<a class="image" href="<?php the_permalink();?>">
<img src="<?php the_post_thumbnail_url(); ?>" alt="Latest News" class="img-responsive">
</a>
<div class="news_desc">
<h3 class="text-capitalize font-light darkcolor"><a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
<ul class="meta-tags top20 bottom20">
<li><a href="#."><i class="fa fa-calendar"></i><?php echo get_the_date( 'M d' ); ?></a></li>
<li><a href="#."> <i class="fa fa-user" aria-hidden="true"></i> <?php the_author_posts_link();?> </a></li>
<li><a href="#."><i class="fa fa-comment-o"></i><?php comments_number( 'no responses', 'one response', '% responses' ); ?></a></li>
</ul>
<p class="bottom35"><?php the_excerpt(); ?></p>
<a href="<?php the_permalink();?>" class="button btnprimary btn-gradient-hvr">Read more</a>
</div>
</div>
</div>
<?php
}
}
?>
<?php get_the_posts_pagination(); ?>
-
This reply was modified 4 years, 8 months ago by
socialwp.