richarduk
Member
Posted 3 years ago #
This is my basic loop for a category page where I'm inserting links to each post with an excerpt acting as a description.
What do I need to do to sort the posts alphabetically?
<?php foreach ($posts as $post) : start_wp(); ?>
<div class="post">
<h2 class="post-title">"> <?php the_title(); ?> </h2>
<div class="post-content">
<?php the_excerpt(); ?>
</div>
</div>
<?php endforeach; ?>
richarduk
Member
Posted 3 years ago #
Damn!
Forgot about the link going active.
Try this.
<?php foreach ($posts as $post) : start_wp(); ?>
<div class="post">
<h2 class="post-title"><z href="<?php the_permalink() ?>"> <?php the_title(); ?> </h2>
<div class="post-content">
<?php the_excerpt(); ?>
</div>
</div>
<?php endforeach; ?>
richarduk
Member
Posted 3 years ago #
1. When posting code, please read the instructions below the input area.
2. That seems to be a WP 1.2 Loop.
3. Search results for "sort posts alphabetically":
http://wordpress.org/search/sort+posts+alphabetically?forums=1
richarduk
Member
Posted 3 years ago #