I’m converting HTML website to wordpress dynamic and having trouble getting duplicate posts. Code is following kindly please guide me in this regard m new with wordpress and PHP.
<div class="container-fluid white-bg">
<div class="container">
<div class="row pricing-main">
<div class="col-md-12 col-sm-12">
<h5 class="text-center">See what we Offer in Membership</h5>
</div>
<?php $posts = new WP_Query( array( 'post_type' => 'pricing' , 'order' => 'ASC' ) );
while($posts->have_posts()) : $posts->the_post(); ?>
<div class="col-md-8 top-spacing col-sm-8">
<p class="prcng-txt"><?php echo get_the_title();?></p>
<p><?php echo get_the_content();?>.</p>
</div>
<div class="col-md-4 top-spacing col-sm-4 hidden-xs">
<img src="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'full' ); ?>" class="img-border img-responsive" />
</div>
<div class="col-md-12 top-spacing col-sm-12 ">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/divider.png" class="img-responsive center-block" />
</div>
<div class="clearfix"></div>
<div class="col-md-4 top-spacing col-sm-4">
<img src="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'full' ); ?>" class="img-border img-responsive hidden-xs" />
</div>
<div class="col-md-8 top-spacing col-sm-8">
<p class="prcng-txt"><?php echo get_the_title();?></p>
<p><?php echo get_the_content();?></p>
</div>
<?php endwhile; ?>
</div>
</div>
</div>