Support » Themes and Templates » Rendering Post Titles in a Table on Index

  • Thanks for reading! Im trying to make a website that where the post titles are listed in a table with alternating coloured cells, but I cannot think of a way to do it, is it possible?

    <center><div class="newstitlebox"><div class="titleboxtext">Site News</div></div></center>
    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="newstable">
    <?php query_posts('category_name=sitenews&showposts=9'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <td><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></td>
    <tr class="newslightbox">
    <?php endwhile; ?>

    The Code works as a whole, however it doesnt display the titles in alternating coloured boxes.

    Any help is appreciated.

  • The topic ‘Rendering Post Titles in a Table on Index’ is closed to new replies.