• Hello guys,

    Here is my code it creates colmn after colmn i want to break after 3 colmns. (i’m new to wp codes)

    <table>    <tr>
      <?php $posts = get_posts('category=3&numberposts=10'); foreach($posts as $post) { ?>
    <td width="150">
    <a>" target="_parent"> <?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
      set_post_thumbnail_size( 200, 100 );
      the_post_thumbnail();
    
    }?></a>
    <a>" target="_parent"><?php the_title(); ?></a>
    
     <?php echo get_post_meta( get_the_ID(), 'event_startEvent Start', true ); ?> 
    
     </td>
    
     <?php }
    
     ?></tr></table>
  • The topic ‘I want to have 3 colmns table in foreach loop’ is closed to new replies.