I use this script to display related posts:
<!-- Related Posts START-->
<?php
$query = get_max_related_posts();
if ( $query ) {
?>
<div class="td_block_wrap td_block_7 td_block_widget td_uid_3_5de39f94df644_rand td-pb-border-top td_block_template_1">
<h4 class="block-title">
<span class="td-pulldown-size">Berita Terkait</span>
</h4>
<div class="td_block_inner">
<div class="td-block-row">
<?php while ( $query->have_posts() ) { $query->the_post(); ?>
<div class="td-block-span6">
<div class="td_module_6 td_module_wrap td-animation-stack">
<div class="td-module-thumb">
<a href="<?php the_permalink(); ?>" rel="bookmark" class="td-image-wrap" title="<?php the_title(); ?>">
<?php the_post_thumbnail(array(100,75) ); ?>
</a>
</div>
<div class="item-details">
<h3 class="entry-title td-module-title">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>" ><?php the_title(); ?></a>
</h3>
</div>
</div>
</div>
<?php } wp_reset_postdata(); ?>
</div>
</div>
</div>
<?php } ?>
<!-- Related Posts END -->
The script displays html like this:
<div class="td_block_inner">
<div class="td-block-row">
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
</div>
</div>
How do I get my related posts script to display html like this:
<div class="td_block_inner">
<div class="td-block-row">
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
</div>
<div class="td-block-row">
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
</div>
<div class="td-block-row">
<div class="td-block-span6">...</div>
<div class="td-block-span6">...</div>
</div>
</div>