I am curious if there is a way to change the order in which things are displayed in browse.php.
It seems the loop() iterator goes through things by database id highest to lowest (basically last added to first added).
Is there a way to change this? Example being date stamp in metadata to make the items appear chronologically.
This is more of a curiosity assessing feasibility question.
I suppose you mean to change the default sort order, as your browse page should already offer you a chance to select some sorting order (title, creator, etc.); if not, maybe there’s an issue with the particular theme you’re using.
Default sort order is defined in
_getBrowseDefaultSort function (and yes, it’s “added date, DESC”).
This said, to solve your issue you might want to look at the Default Sort plugin, either the original one by Anuragji (https://github.com/anuragji/DefaultSort) or my fork (https://github.com/DBinaghi/DefaultSort). Please do not forget to check the README.md file instructions, as they address also the theme customization issue.
Hope this helps.
This topic was automatically closed after 250 days. New replies are no longer allowed.