php - How can I change this function to display only twice articles? -


i have page in wordpress:

link

code php:

<?php query_posts('cat=16'); $count = 0; while (have_posts()) : the_post();     $count++;     if ($count == 1) {  ?>          <div class="row">             <div class="col-lg-6 col-height" >                 <div class="text-box-right">                     <div class="title-home"><?php the_title(); ?></div>                      <div class="content-home"><?php the_content(); ?></div>                 </div>             </div>             <div class="col-lg-6 col-height" >                 <div class="prod-box-left">                     <?php the_post_thumbnail('news'); ?>                 </div>             </div>         </div>          <div class="row">             <div class="col-md-4"><div class="content-home"><?php the_content(); ?></div></div>             <div class="col-md-4">2</div>             <div class="col-md-4">3</div>         </div>      <?php } else { ?>          <?php $count = 0; ?>          <div class="row">             <div class="col-lg-6 col-height" >                 <div class=" prod-box-right">                     <?php the_post_thumbnail('news'); ?>                 </div>             </div>             <div class="col-lg-6 col-height">                 <div class="text-box-right">                     <div class="title-home"><?php the_title(); ?></div>                     <div class="conteont-home"><?php the_content(); ?></div>                  </div>             </div>         </div>      <?php } ?>  <?php endwhile; ?> 

the problem items displayed twice ... , want displayed @ bottom.

i put picture better understand mean.

enter image description here

what wrong function? think can me solve problem please?

thanks in advance!

when if statement true if ($count == 1) block of code used has function the_content() twice. imagine why you're getting duplicate content. remove 1 of functions eliminate repetion.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -