• I’ve managed to get my wordpress site running and my posts sorting by title (ascending) rather than post id (descending). However, when I go into a specific post, the next / prev links are still sorting by post id (i.e. the previous post link links to the displayed item’s previous and next post by post id RATHER THAN previous and next by title).

    Anyone know a good way to fix this? – obviously it’s only affecting the single.php page..

    Firstly, here’s how I achieved the posts listing alphabetically by title: (I know this info is elsewhere on the support but it took me some time to find it so it might be useful to others…)

    I replaced the line:

    <?php if (have_posts()) : ?>

    with

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

  • The topic ‘Sort by title working fine – problem with Next / Prev on single.php page’ is closed to new replies.