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)

The topic ‘Get Previous Post based on Custom Field Name’ is closed to new replies.