Archived topic
Front-end Sorting of Blog posts
10 replies · Started by Marcus on March 21, 2019
Hi Tom and good GP people!
My client is requesting that I provide a way, on the front-end, to sort or re-sort the order of blog post listing on the front-end of the website.
For example, we have a category of posts called "Publications" and they want to be able to click/select "Sort by Date ASC, Date DESC, or Alpha by Title."
I saw this thread https://generatepress.com/forums/topic/sorting-posts/ - which got me thinking that if I could pass the sort via the query string, that might work?
I looked through the list of filters, but I'm not sure which one might help me achieve this.
I appreciate any help in the right direction.
Hi there,
The thread you linked suggested 3 plugins.
Have you tried any of them?
This would require a custom solution, which is out of the scope of this forum, without a third party plugin.
Yes, the first thing I did was to review the plugins on the other thread. None of them provide sorting of posts on the front-end.
Thanks anyway Leo.
What about this solution?
https://www.wpbeginner.com/plugins/how-to-let-users-filter-posts-and-pages-in-wordpress/
Thank you Leo! I appreciate the link. I hadn't run across that one yet in my searching.
No problem.
This is all handled by Wordpress itself (not theme specific) so I would think there should be some good solutions out there.
Hope you can get it working!
Thank you yet again Leo.
BTW, I also just found this plugin which provides blog post sorting. Looks promising.
https://wordpress.org/plugins/posts-data-table/
Again, I appreciate the help.
Awesome!
Thanks for reporting back :)
Figured there must be something.
Hi Marcus,
I'm using Posts Table Pro for a solution where I've created a database of recordings using a custom post type. It's extremely flexible, easy to implement, and looks great. One thing you'll not see quickly in the docs is that by default, except for the main title of the blog post, any other fields sort within the table rather than linking to the archive page, but there's an option to change that.
Give it a go, it's quite neat. Scales down well to mobile as well.
cheers
Mike
Thanks Mike!
Excellent! Thank you Mike. Thank you again Leo.