Support

Account

Home Forums General Issues Get Previous Post based on Custom Field Name

Helping

Get Previous Post based on Custom Field Name

  • I am looking to create navigational links (previous and next) for a custom post type, say “brands”.

    I am having trouble creating a query, where the previous and next navigational links on each custom type post will be based on the alphabetical order of custom field “br_name”.

    If I use get_previous_post(), the result is chronological based on the creation of the post which is not what I want.

    Any ideas would be much appreciated.

    thanks,
    Andrew

  • Is the value of “br_name” unique for every post? What type of field is “br_name”?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.