Is there a way to order the results of "Pages tagged with"?

I like using page properties to organize my pages. I also like to use properties to create hierarchies. For example, for school work I have a page for “Courses” which has “Autumn 2024”, “Spring 2025”, etc. Under “Autumn 2024” I have courses which I’m taking in the autumn. I add courses to the autumn semester page by adding an “Autumn 2024” property to my course pages. However, I’d like to change the order of the courses that I see on “Autumn 2024”. Is there a way to achieve this? I know I could just create page references by hand, but isn’t using properties considered the better way of doing it?

Welcome. You need to build an advanced query. Look for :result-transform and sort-by .

Thanks, I suspected that an advanced query might be needed. Since posting this question, I realized that I probably didn’t want to sort the list of tagged pages. Instead, I want to sort them based on when they were last accessed or modified. I did some searching and found a ready-made query which sorts the results based on when a page was last edited, for the code, click here. The page you posted looked promising, but I don’t know the first thing about writing advanced queries.

I think that query I found comes close enough to what I want to achieve. Help is still much appreciated, if someone feels like contributing.

What exactly are you missing from the found query to achieve what you want?

Apologies, I was a bit busy so couldn’t reply. The query I found is pretty good. I just started thinking, now that I’ve got that query running, is there a way to hide or collapse “Pages tagged with”? I’d like to keep the tags in place, since they help with organizing the pages, but I don’t necessarily need to see them, at least not on that particular page.

I learned from a forum post that there’s a line the Config which allowed to set Linked References as collapsed when a certain number of References had accumulated. This is the line of code:

:ref/linked-references-collapsed-threshold [value between 0 and whatever you like]

I was wondering if there is a similar thing for ‘Pages tagged as’. I didn’t see anything like that in the Config file but I may have overlooked. Also, thanks for trying to help although my question has been evolving along the way.