Tags posts in reverse chronological order

Hi !

How can I make post in /tag/ route appear in reverse chronological order without edit the theme template ?

Make some tests with routes.yaml.

It’s work if I put order in /

collections:
/:
    permalink: /{slug}/
    template: index    
    order: desc

but if I try to to add /tag/ in collections: like

   /tag/:
    permalink: /tag/{slug}/
    order: desc

It doesn’t work :confused:

Thank for your help.

Hey there!

You have to specify a filter for a collection, since collections are used to split up the content on your site into specific sections and alter the URL a post lives on.

However, if you’re trying to change the order of posts that appear on your tag routes (eg: Getting Started - Ghost) then it sounds like you might need to make some changes to your theme. What theme are you using? By default, Ghost will return a reverse chronological feed of posts.

Hello Kym, thx for reply.
I understand well the concept of collection and filter and I’ll ask if it was possible to reverse order on all tag/slug pages, because I don’t want to make modification on the theme (for easy upgrade).
I’m with the Casper default theme.
I suppose it was impossible :wink:

I’m with the Casper default theme.

Posts on /tag/{slug} should be reverse chronological by default.

Oh yes sorry It’s ‘chronological order’ not reverse I want :face_with_hand_over_mouth:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.