• Hi!

    I want to display the posts on my blog in dynamic tables. One column would have the date of a post, the column beside that would have the title, the next a category, etc.

    So, on the homepage the newest posts would be in a dynamic table. If someone searched, the results would be a dynamic table.

    How exactly would you do this? What would the code look like?

    Thanks!

Viewing 1 replies (of 1 total)
  • generally, as the loop, consider to use for example this structure (untested):

    <?php if( have_posts() ) : ?>
    <table>
    <?php while(  have_posts() ) : the_post(); ?>
    <tr>
    <td><?php the_date(); ?></td>
    <td><?php the_title(); ?></td>
    <td><?php the_category(); ?></td>
    <!--etc -->
    </tr>
    <?php endwhile; ?>
    </table>
    <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘How do you display posts on a blog in dynamic tables? How would the code look?’ is closed to new replies.