Custom Sorting of Categories Without Shortcodes
-
I would like the option to sort the order in which posts are displayed in categories without having to use a shortcode like the display posts shortcode. What I have in mind is something like this:
On each category page there are two simple drop down menus. One has lists sorting options (for instance, by date, alphabetically, author, etc.). The second is for ascending or descending order.
In addition, I would like in Settings –> Reading a global sort option with the same two drop-down menus.
This way one can easily determine the sort order of posts in categories on a global level while having an override for individual categories.
Thanks and be well,
Moshe
The blog I need help with is: (visible only to logged in users)
-
Hi there!
Thanks for your suggestions. :) Right now, these aren’t possible, however, you may continue to experiment with our Posts shortcode to achieve a similar result.
Instead of using dropdown menus, you may create pages displaying posts sorted according to different criteria. You may then create a menu linking to all pages and either put the menu inside each page or place it in a Text widget. Alternately, a Custom menu may give you the “dropdown” effect you were looking for. You may want to experiment with that as well.
Let me know if you need further help and I’d be glad to assist in any way I can. Thanks!
-
Hello,
Thanks for replying.
I know that there are work-arounds, but the suggestions I’ve seen so far seem rather cumbersome for what could and should be a rather simple task. To have to create pages for each category that I wish to display in chronological or alphabetical order (rather than in reverse chronological order) seems overkill.
It also seems to me that this is a rather easy change to make — the ability to sort category pages already exists. All that is needed is a simple admin feature to implement that change.
Any chance, therefore of seeing this in a future update?
Thanks and be well,
Moshe
P.S. I just want to make sure that it is clear what I’m asking for. On an archive page the posts are displayed in reverse chronological order (newest posts appear first). What I want is a backend option to change the order and criteria by which those posts are displayed on archive pages.
-
I second this suggestion and would extend it to tags as well as categories.
As for workarounds, you can reverse the chronology of the posts (oldest posts appear first) by adding “?order=asc” to the end of the URL.
I thought I had found a similar workaround for alphabetizing posts, but it only orders them from Z to A.
https://en.forums.wordpress.com/topic/alphabetizing-posts-on-category-pagesAnd either way, the link at the bottom to go to the next page of results always says “Older” instead of “Newer” or “More” so it’s not an ideal solution.
-
Thanks for the suggestions! They both sound excellent — now the trick is how to get these implemented. We have a WordPress.org trac where you can make feature requests to the core WordPress.org software. If and when these features are approved, these are eventually integrated into the WordPress.com core.
https://core.trac.wordpress.org/
Please read through the documentation on the site prior to making a request and make sure to search the trac to see if the feature you wanted hasn’t already been requested. Good luck!
- The topic ‘Custom Sorting of Categories Without Shortcodes’ is closed to new replies.