WordPress.org

Support

Support » How-To and Troubleshooting » Creating list of all posts ordered by category

Creating list of all posts ordered by category

  • Trying to create an archive listing of all posts ordered first by category, then by date and then by title. The date and title organizations seem to work fine, but category never works–I get zero category organization with this code.

    <?php global $post;$myposts = get_posts('numberposts=-1&order=DESC&orderby=category date title');foreach($myposts as $post): ?>
    <TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0 STYLE="margin-top:5px;">
    <TR>
    <TD STYLE="padding-bottom:5px;border-bottom: 1px dashed #eaeaea;border-right: 1px dashed #eaeaea;" WIDTH=75% ALIGN=left VALIGN=middle><FONT CLASS="font4"><A HREF="<?php the_permalink(); ?>"><?php the_title(); ?></A></FONT></TD>
    <TD STYLE="padding-bottom:5px;border-bottom: 1px dashed #eaeaea;" WIDTH=25% ALIGN=right VALIGN=middle><FONT CLASS="font3"><?php the_category(', '); ?></FONT></TD>
    </TR>
    </TABLE>
    <?php endforeach; ?>

    Listing appears in the right column of my pages: http://www.jadedgamefans.com/ninja250blog/

  • The topic ‘Creating list of all posts ordered by category’ is closed to new replies.