WordPress.org

Ready to get started?Download WordPress

Forums

echo posts in table (1 post)

  1. bondigor69
    Member
    Posted 1 year ago #

    hey guys I have this code and I want the post to be in a table (6 columns and 3 rows)
    How can I do that????
    Help Will be appreciated

    <?php if (have_posts()) : ?>
    
    	<?php while (have_posts()) : the_post(); ?>
    
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <?php if( function_exists("the_post_thumbnail") AND !function_exists("tfe_get_image") ) the_post_thumbnail( "thumbnail", array("class" => "alignleft postthumb") ); ?>
    <div class="post-headline"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2></div>
    
    <div class="post-byline">By <?php the_author(); ?></div>
    
    <div class="post-bodycopy">
    <?php the_excerpt(); ?>
    </div>
    
    <div class="post-footer"><?php the_tags("Tags: ", ", ", "<br />"); ?> Posted in <?php the_category(", ") ?> | <?php edit_post_link("Edit", "", " | "); ?>  <?php comments_popup_link("No Comments »", "1 Comment »", "% Comments »"); ?></div>
    </div>
    
    	<?php endwhile; ?>
    
    <?php if ( is_single() ) { comments_template(); } ?>
    
    <?php else : ?>
    
    	<h2 class="center">Not Found</h2>
    	<p class="center">Sorry, but you are looking for something that is not here.</p>
    	<?php get_search_form(); ?>
    
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic