Forums

[resolved] pages in chronological order (7 posts)

  1. TGC5308
    Member
    Posted 1 year ago #

    I have a site with a list of monthly newsletters. I cannot figure out how to get them in chronological order. I changed the order numbers and this shows in the dashboard but not on the site itself.

    Please help.

    Thanks

  2. MichaelH
    Volunteer
    Posted 1 year ago #

    To resort the order of posts, using the WordPress Default theme for example, in the wp-content/themes/default/index.php file, just before the line:
    <?php if (have_posts()) : ?>

    put this:

    <?php query_posts($query_string . '&orderby=date&order=ASC'); ?>

    The query_posts() article explains the arguments in detail.

  3. richarduk
    Member
    Posted 1 year ago #

    Usually the relevant page - category.php? Index.php? - will have a query_posts. In there you can add order=ASC or order=DESC (can't remember which)

    http://codex.wordpress.org/Function_Reference/query_posts

  4. TGC5308
    Member
    Posted 1 year ago #

    So I am guessing that I need to make the changes from the editor (HTML) page and not the dashboard. Is this correct?

  5. richarduk
    Member
    Posted 1 year ago #

    correct

  6. MichaelH
    Volunteer
    Posted 1 year ago #

    You would be using the theme editor for that.

    Also see:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  7. TGC5308
    Member
    Posted 1 year ago #

    Fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.