WordPress.org

Ready to get started?Download WordPress

Forums

Creating list of all posts ordered by category (1 post)

  1. R.Sallee
    Member
    Posted 5 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.