Support » Fixing WordPress » Why won’t my posts sort by post_name (slug)?

  • Here’s my code:
    <?php get_posts('orderby=post_name&order=DESC'); ?>
    <ul class="menubox"><?php while (have_posts('')) : the_post(''); ?>

    <li><a href="<?php the_permalink() ?>"><?php the_excerpt(); ?><?php the_title(); ?></a></li>
    <?php endwhile; ?>
    </ul>

    and here’s my URL: http://tinyurl.com/lof3u (please don’t post the actual URL, I don’t want the thread to cache on google)

    What am I doing wrong? I made the post slugs just the last names so that I could sort the page alphabetically… and I can’t figure out how to make it happen.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why won’t my posts sort by post_name (slug)?’ is closed to new replies.