Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $query = new WP_Query( $args );
- if ( $query->have_posts() ) { ?>
- <table>
- <?php $i = 0;
- while( $query->have_posts() ) {
- $query->the_post(); ?>
- <?php if($i == 0){ echo "<tr>"; }?>
- <td class="item_post_man">
- <a href="<?php echo get_permalink(); ?>">
- <?php if ( has_post_thumbnail() ) {
- the_post_thumbnail('thumb_product_cat', array( 'class' => 'img-responsive' ));
- } ?>
- <p class="title_man"><?php the_title(); ?></p>
- </a>
- </td>
- <?php $i++;?>
- <?php if($i == 3){ echo "</tr>"; $i=0;}?>
- <?php } ?>
- </table>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement