WordPress.org

Ready to get started?Download WordPress

Forums

Meta Query - How to select distinct / non duplicate entries? (2 posts)

  1. ikjosh
    Member
    Posted 1 year ago #

    I am querying a custom post type and returning values, which would be Cities, States and Countries. There are many entries that have the same city, state and country, but I only want to display once instance.

    I'm using this in a drop down menu, so if there is 15 entries in USA, I only want once instance of "USA" in the drop down (then when they select and hit search, I've setup a page to list only entries in USA)

    How do I do this query? Right now it just lists all the entries, so there is 15 lines for USA, Canada, etc.

  2. Troy Dunn
    Member
    Posted 1 year ago #

    @ikjosh - Can you post your code?

Topic Closed

This topic has been closed to new replies.

About this Topic