Support » Fixing WordPress » Order by 3 values?

  • I have “the_title” which is the original post title and then I have about 9 custom fields using Advanced Custom Fields where of 2 I want to use for order/sorting and they are called “sorting”(text) and the other “year”(date).
    What I wan’t to do is do is first sort by [sorting] alphabetically, then by [year] and last by [the_title] alphabetically.

    I use a category for all my posts with ID=1

    How can this be done?

    WP_Query something something??

Viewing 2 replies - 1 through 2 (of 2 total)
  • What do you mean by sorting by alphabetically, then by year, then by title (alphabetically)?

    So you are wanting this on one query correct? If so, then only one alphabetical sort is needed since the other one does not make any sense that I can see. Let us know how that works.

    Any yes it would be done by using WP_Query.

    No, that would make it a mess I’m afraid.
    The project I’m working on is a site for my record collection. Minor CSS stuff to fix but other than that the site is done except the index site over my record collection.
    So “sorting” is the artist name, “year” the date of the release for the record and “title” the title of the album.

    First sort artist, then all the albums by that artist in chronological order and if there are more than 1 record with the same artist sharing the same year then sort those alphabetically.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Order by 3 values?’ is closed to new replies.