Rendering Post Titles in a Table on Index (1 post)

  1. XFire
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic