Sorting posts alphabetically by custom taxonomy? (2 posts)

  1. Filia Libri
    Posted 2 years ago #


    I’ve got the following question(s):

    I have a book blog with lots of new reviews posted every month and I’m looking for a way to create overview pages that automatically include all posts without me having to add everything manually.

    So what I’m looking for is a way to display a) a list of all post titles in the category “review” and b) a list of all post thumbs in the category “review” and - and that's the real problem here - also a way to display them either sorted alphabetically by custom taxonomy “author”, by custom taxonomy “title” or by custom taxonomy “series”.

    I guess the solution to the first thing would be just a simple post-query filtering by category and then displaying either only the title or thumb of the query’s results but it’s the second one, the sorting part, that’s giving me some big trouble. Is it possible at all? Sorting something alphabetically by (custom) category/tag?

    Thanks a lot!

  2. vtxyzzy
    Posted 2 years ago #

    Sorting by the value of a custom taxonomy term is certainly possible. Here is an article with some sample code that may help: http://wordpress.mcdspot.com/2013/01/25/sort-on-presence-of-custom-field-field-value-then-date/

Topic Closed

This topic has been closed to new replies.

About this Topic