WordPress.org

Ready to get started?Download WordPress

Forums

post sort order issue in category page (6 posts)

  1. innove
    Member
    Posted 3 years ago #

    Hi sir, pls help me! its very urgent!!!

    I want to display the posts by title order. so i used this code "<?php query_posts($query_string . '&orderby=title&order=asc'); ?>" to achieve the task but no luck.

    My Post order is

    se4f1
    se4f2
    se4f3
    se4f4
    se4f5
    se4f11
    se4f12
    se4f13
    se4f14
    se4f6
    se4f7
    se4f8
    se4f9
    se4f10
    se4f15
    se4f16
    se4f20
    se4f21
    se4f17
    se4f18
    se4f19

    after used above code

    I am getting
    se4f1
    se4f10
    se4f11
    se4f12
    ....
    ....
    se4f2
    se4f20
    se4f21
    se4f3
    se4f4

    but I need

    se4f1
    se4f2
    se4f3
    se4f4
    se4f5
    se4f6
    se4f7
    se4f8
    se4f9
    se4f10
    se4f11
    se4f12
    se4f13
    se4f14
    se4f15
    se4f16
    se4f17
    se4f18
    se4f19
    se4f20
    se4f21

    Please any one help me

    Thanks
    Thiru

  2. alexpts
    Member
    Posted 3 years ago #

    try
    orderby=id

  3. innove
    Member
    Posted 3 years ago #

    Hi, thanks for the help, but its not working for me because

    title = ID
    ----------
    se4f1 = 15
    se4f2 = 18
    se4f3 = 2
    se4f4 = 11
    se4f5 = 1
    se4f6 = 7

    Ids are random... that is why I used orderby=title.

    Pls help me somebody.

    Thanks

  4. alexpts
    Member
    Posted 3 years ago #

  5. innove
    Member
    Posted 3 years ago #

    Hi, thanks for your reply. I got the solution.

    I changed my title se4f1 to se4f01, 2-02, 3-03.

    now its working fine.

    Thanks

  6. alexpts
    Member
    Posted 3 years ago #

    Good )

Topic Closed

This topic has been closed to new replies.

About this Topic