help with posts in ascending order and not date? (6 posts)

  1. extremerecruitment
    Posted 4 years ago #

    my site lists entries which are posts i have laoded under various categories

    the list of all posts can be seen at http://www.yachtprovisioningservice.com/?page_id=39

    then if you click on the category links it lists the posts that were loaded with these categories selected.

    at present these lists of posts are appearing in date order as i have laoded them but i want the posts to apepar in alphabetical order isntead of by date loaded order.
    eg go to page http://www.yachtprovisioningservice.com/?page_id=39

    click the '•Western Mediterranean (5) ' link

    this shows the posts under this category by post title but not in alphabetical order. this is what i wnat to change]

  2. Digital Raindrops
    Posted 4 years ago #

    Add before the loop call!

    <?php query_posts($query_string . "orderby=title"); ?>

    Example Twenty Ten category.php

    query_posts($query_string . "orderby=title"); 
    get_template_part( 'loop', 'category' );

    Other themes:

    <?php query_posts($query_string . "orderby=title"); ?>
    <?php if( have_posts() ) : ?>



  3. extremerecruitment
    Posted 4 years ago #

    thanks.. which file do i edit?
    this is the simplicity theme not twenty ten.
    sorry for my ignorance here..
    need to know which file to edit

  4. Digital Raindrops
    Posted 4 years ago #

    It would be category.php or archive.php, but only do this on a test site first and if you have FTP, if you mess up the php code using the WordPress > Admin > Appearance > Editor you will lock yourself out, with a fatal error message.


  5. extremerecruitment
    Posted 4 years ago #

    ok thanks. will try boith
    if i lock it i can always ftp the original file from the archive]

  6. CAThreadgill
    Posted 3 years ago #

    I need some help. On my website I have "Categories" and below that "Pages" and below that "Posts".

    My problem is that I cannot get the "Posts" to sort alphabetically. I have tried the suggestion above and it didn't work for me. Maybe I was adding it in the wrong area.

    Here is one of the pages:


    The theme I am using is "Twenty Ten"


Topic Closed

This topic has been closed to new replies.

About this Topic