Archived topic
Dynamic content in alphabetical order
9 replies · Started by Samuel on May 1, 2022
Hello,
I'm using the Block element - Content template to display hotels grid (CPT).
I would like to know if it's possible to display the grid in alphabetic order ?
You'll see an example in private informations.
Thanks for your help,
Samuel
Hi Samuel,
That's not something the content template can control as content template is for appearance only.
The actual query loop is still handled by WP core.
I would recommend Googling the keyword "display cpt in alphabetical order" to see some suggestions such as this one:
https://wordpress.stackexchange.com/questions/28653/displaying-a-custom-post-type-alphabetically
Hi Leo,
This solution is not working for me, it breaks my website. I'll look for another solution then.
But, I have a question: will you add a "sort" feature in the future GB's update using queries ?
will you add a “sort” feature in the future GB’s update using queries ?
No - that isn't in our plan currently.
Wow, but if GB is supposed to replace WP show post and WPSP had the sort feature, how are we supposed to switch from WPSP to GB then ?
Hi Samuel,
Are you referring to the Order and Order by parameters of WPSP? If so, yes, these would be included in the Query Loop Block: https://share.getcloudapp.com/4guKpjGd
Hope this clarifies. If you’re referring to something else, kindly let us know. :)
Yes I was referring to this feature. Is there a beta version of GB with Query loop block available ?
The official update hasn’t been released yet as the team is still making sure that the update will work as seamlessly as possible.
You can see the development updates here: https://github.com/tomusborne/generateblocks/actions
You may also test it out here, though it’s still in development: https://github.com/tomusborne/generateblocks/actions
Hope this clarifies. :)
Thanks a lot ! :)
You’re welcome Samuel! :)