Get category then sort by meta-value (2 posts)

  1. jageo
    Posted 4 years ago #

    I have an Obituaries page where I would like to list an archive of the posts in that category, separated out by year.
    So I figure I want to get posts where category_name=obituaries
    THEN, get all the values of meta_key=obit_year
    THEN, foreach obit_year echo the obit_year
    Then, loop through the posts

    I've looked a many examples of code, but I'm stumped practically right at the start - how structure the query within the query.

    (Obit posts are not always going to come in on a timely basis, so I can't rely on the post date for sorting).

    Thanks for any pointers

  2. jageo
    Posted 4 years ago #

    I marked this resolved only because I rethought my plan.
    Explained better in this thread HERE.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.