Wordpress Blog Post Dynamically Display
This is the process of blog post display in your WordPress theme.
<div class="row">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="post-box">
<div class="inner-post-box">
<div class="image-box">
<a href=""><img class="img-responsive transition7s" src="<?php echo get_template_directory_uri();?>/images/resource/blog-1.jpg" alt=""></a>
<div class="post-caption transition7s">
<ul>
<li><i class="fa fa-user"></i><?php the_author(); ?></li>
<li><i class="fa fa-calendar"></i> <?php the_time('g: i a'); ?> </li>
<li><i class="fa fa-comment"></i>
<?php comments_popup_link( __( 'Leave a comment', 'carnewstheme' ), __( '1 Comment', 'carnewstheme' ), __( '% Comments', 'carnewstheme' ) ); ?>
</li>
</ul>
</div>
</div>
<div class="content">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?> </a></h3>
<div class="text-des">
<?php the_excerpt(); ?>
</div>
</div>
<div class="post-info clearfix">
<div class="pull-left">
<a class="btn btn-primary transition7s" href="news-single.html"><i class="fa fa-calendar"></i>
<?php the_time('M d, Y'); ?>
</a>
</div>
<div class="pull-right">
<a class="btn btn-primary transition7s" href="<?php the_permalink(); ?>">Read More</a>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
No comments