Wordpress Alphabetizing Posts
Wordpress post are usually order chronologically.
But sometimes you need the ordered another way
For http://forsythfacingforward.com/ they needed the post or links alphabetically.
Just as the correct portion of the following code and your on your way
Here is the code. The most important part is in bold
?php
get_header();
?>
<div id="content">
<?php
// we add this, to show all posts in our
// Glossary sorted alphabetically
if (is_category('Glossary'))
{
$posts = query_posts($query_string .
'&orderby=title&order=asc&posts_per_page=-1');
}
// here comes The Loop!
if (have_posts()) : while (have_posts()) : the_post(); ?>
People who read this also read:


