WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. XFire
    Member
    Posted 6 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(); ?>
    <tr>
    <td><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></td>
    </tr>
    <tr class="newslightbox">
    <td></td>
    </tr>
    <?php endwhile; ?>
    </table>

    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