• Resolved x9tripboarder16

    (@x9tripboarder16)


    I don’t know if this is possible, but I am creating a wordpress site where I want to display excerpts from my posts in a table whereas there are 3 columns, and an unlimited number of rows (defined in the reading options panel). In each of the columns on the first row, I want the next post.

    In other words column 1 of row 1 has the first post, column 2 of row 1 has post 2, and column 3 of row 1 has post 3. Does anyone have any ideas? Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter x9tripboarder16

    (@x9tripboarder16)

    I figured it out with some help. Define a table whereas you just use the <table> tag. Then put in the following code:

    <?php while (have_posts()) :
    echo “<tr>\n”;
    for ($i = 0; $i < #; $i++) :
    the_post();
    echo “<td>\n”;
    echo $post->post_excerpt;
    echo “
    \n”;
    echo $post->post_title;
    echo “</td>\n”;?>
    <?php endfor; echo “</tr>\n”; endwhile; echo “</table>\n”; ?>

    Where the # is the number of columns.

    Thanks ?? I think this will help alot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display Excerpts in Table’ is closed to new replies.