Forums

Rearranging post orders (3 posts)

  1. aqaz69
    Member
    Posted 3 years ago #

    Is there any way to change the order that the posts appear in each category? By default it always showed the last entered as first, but this does not work for my purpose organizationally.

    Thanks!!

  2. spstieng
    Member
    Posted 3 years ago #

    In the query_posts() have you tried using 'order=ASC' or 'order=DES'?

    I use the following code:
    query_posts("$cat&paged=$page&orderby=title&order=ASC");

    ($cat is a concatinated string and $page is for pagiantion purpose)

  3. VelvetBlues.com
    Member
    Posted 3 years ago #

    Look at the documentation for get_posts() at http://codex.wordpress.org/Template_Tags/get_posts

    There are two parameters that you can use. The first is 'order' and it allows you to sort the posts ASC (ascending) or DESC (descending), in chronological order.

    The second is 'orderby'. Use this to order by post_title, post_date, ID, post_modified, etc...

    Yes, query_posts() can be used as well. See http://codex.wordpress.org/Template_Tags/query_posts

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.