The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WordPress: Use query_posts to order_by tag alphabetically Re: WordPress: Use query_posts to order_by tag alphabetically


Hey clokey thanks for the reply again, really appreciate your input. The filtering blocks worked great and I was able to categorize the posts into tabs by their tag-name. While the filtering blocks allow me to filter certain posts it doesn’t allow me to display all of the posts in a specific order (in this case alphabetically). I have 5 options, the first is ‘All’ the second is ‘Type’ and the last 3 are categories. The ‘All’ and the categories work fine using the filtering blocks, but the ‘Type’ option needs to list all of the posts in order by tag-name alphabetically.

I understand what you’re saying about there being multiple tags and not knowing which one to use to order by, I was hoping it would just take the first one and use that, but unfortunately not. I thought that order_by=tag was ordering the posts by tag ID, but after further investigation it was just coincidence!

I’m by no means an expert in PHP but do you know whether it’s actually possible to achieve this?