• I was wondering if someone could point me in the right direction with this.

    I would like to display a list of post with extra data listed with the post.

    IE.

    TITLE / EXCERPT | DATE | RATING | # of comments | CATEGORY

    How To Get Fat | 09/09/09 | ***** | 49 comments | Diets
    First you eat lots |
    of lard

    To do this would I use

    <?php
     $postslist = get_posts('order=ASC&orderby=title');
     foreach ($postslist as $post) :
        setup_postdata($post);
     ?>
    <tr>
     <td><?php the_title(); ?></td>
     <td><?php the_excerpt(); ?></td>
     <td><?php the_date(); ?></td>
    <td><?php comments_number('0','1','%'); ?></td>
    <td><?php the_rating(); ?></td>
    <td><?php the_author(); ?></td>
    <td><?php the_category(); ?></td>
    </tr>
     <?php endforeach; ?>

    Also is there anyone who might know how to create a link that will change the php on the fly. So for example if someone clicks on “date” it will sort by date.

    Basically either load a new php or replace “title” with “date”

    $postslist = get_posts('order=ASC&orderby=<strong>title</strong>');

    Thanks so much for any help,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Display posts list in table format with extra data’ is closed to new replies.