How can I reverse the order of posts in a category?

  • Unknown's avatar

    How can I reverse the order of posts in a category?
    I don’t think this is possible under the current blog software, but I would appreciate it if you could forward this idea to the appropriate department. After we complete a journey’s posts on our travel blog, it would be great if we could allow readers to view the category chronologically without having to remove the posts and then repost them.
    This would be a helpful tool for many bloggers.
    Word Press is great!
    Thank you.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there!

    Reversing the order of posts is possible with the Display Posts shortcode. First, you will need to create a static page to house all of your blog posts. If you want to display them by category, you could name the page with the title of the category (Camino de Santiago for example). Then, you can use the following code:

    [display-posts order="ASC" category="Camino de Santiago"]

    That shortcode will display all posts in the Camino de Santiago category in chronological order. You can read more about the shortcode including other modifiers here:

    Display Posts Shortcode

    Does that accomplish what you’re looking for?

  • Unknown's avatar

    Thanks for your reply.
    I created a page and named it Camino de Santiago. Where do I put the code you suggested?
    Thank you,
    Reg

  • Unknown's avatar

    Hi Reg,

    Just copy the code and place it in the Text Editor. The difference between Text and Visual is described here:

    Types of WordPress Editors

    Let me know if that is what you’re looking to accomplish!

  • Unknown's avatar

    Hi Jeremey,
    Thanks…I did that and it put several of the posts in order, just by headline. Is there a way I can put the entire category on the page, with some text?
    I appreciate your help!
    Reg

  • Unknown's avatar

    Hey Reg,

    Can you give this a try?

    [display-posts order="ASC" category="Camino de Santiago" posts_per_page="20" include_excerpt="true"]

    Let me know if that works for what you’re looking for!

  • Unknown's avatar

    Hi Jeremey,
    That put more posts on the page and some text, but I think it is not very inviting for the reader.
    Is there a way to put the posts in order by date posted, but to see the entire post? Like how it would be if a reader clicked on our category, but now the posts appear with the last post first. We would like to just reverse the order so that readers could scroll down the posts and navigate to “older posts” that would actually be newer posts.
    I appreciate your patience. As you can tell, I am challenged by the technical side of blogging.
    Many thanks,
    Reg

  • Unknown's avatar

    Hey Reg,

    This should do the trick:

    [display-posts order="ASC" category="Camino de Santiago" posts_per_page="30" include_content="true"]

    Let me know!

  • Unknown's avatar

    Hi again Jeremey,
    You did it! I am impressed. I changed the number to 65 to include all the posts in the category. I replaced the category with the page in our menu and added a short introduction.
    Thanks so much!
    Best,
    Reg

  • Unknown's avatar

    Not a problem! Happy to help. Let me know if you need anything else!

  • The topic ‘How can I reverse the order of posts in a category?’ is closed to new replies.