• Hi I’ve created an authors page which consists of the author details, and the title’s of the posts they’ve written.

    The following code organises the posts alphabetically for me

    <?php
    $posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1');
    if (have_posts()) : while (have_posts()) : the_post(); ?>

    I was wondering if it’s possible to modify this code so that it displays the post via category and then alphabetically ?

    The reason being is that each category uses a different coloured link so it looks smarter grouping the posts from a each category.

    Any help welcome, cheers

The topic ‘Order By Category’ is closed to new replies.