• Hi all.

    I’ve got a custom post type called ‘progetti’.
    Every custom post has 4 custom fields:

    • month
    • year
    • status
    • kind

    I query a taxonomy page to show all the custom post with a certain “kind” custom field.
    I wanna then sort them per year and per month.

    If I try like this
    query_posts($query_string. '&orderby=meta_value&meta_key=year&order=DESC&posts_per_page=-1' )
    I have them ordered by the year custom field.

    Is it possible to make it?

The topic ‘Sort a custom post type archive page using two custom fields’ is closed to new replies.