List Posts Numerically **Help
-
I want to ‘Alphabetize’ posts but all the post tiles are in numbers such as 945, 1081, ect. I have tried to alphabetize but have been unsuccessful. Here is what my loop looks like for my archive page(with some of the extra code taken out. Thanks a ton in advanced.
-Justin
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php query_posts(‘posts_per_page=100’); ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”post5″ id=”<?php the_ID(); ?>”><h3>Unit Number: “><?php trim_title(); ?></h3>
<hr />
“>Click For More Images<div id=”moretext”><p>
“><span class=”moretext”>Click For More Information</span> </p></div>
</div>
</div><?php endwhile; ?>
<?php else :
if ( is_category() ) { // If this is a category archive
printf(“<h2 class=’center’>Sorry, but there aren’t any posts in the %s category yet.</h2>”, single_cat_title(”,false));
} else if ( is_date() ) { // If this is a date archive
echo(“<h2>Sorry, but there aren’t any posts with this date.</h2>”);
} else if ( is_author() ) { // If this is a category archive
$userdata = get_userdatabylogin(get_query_var(‘author_name’));
printf(“<h2 class=’center’>Sorry, but there aren’t any posts by %s yet.</h2>”, $userdata->display_name);
} else {
echo(“<h2 class=’center’>No posts found.</h2>”);
}
get_search_form();endif;
?>
- The topic ‘List Posts Numerically **Help’ is closed to new replies.