WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. extremerecruitment
    Member
    Posted 3 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]
    ]thanks!

  2. Digital Raindrops
    Member
    Posted 3 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() ) : ?>

    HTH

    David

  3. extremerecruitment
    Member
    Posted 3 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
    thanks!

  4. Digital Raindrops
    Member
    Posted 3 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.

    David

  5. extremerecruitment
    Member
    Posted 3 years ago #

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

  6. CAThreadgill
    Member
    Posted 2 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:

    http://wineloverstravelguide.com/category/arizona/

    The theme I am using is "Twenty Ten"

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags