Home Forums General Issues Split page by custom field


Split page by custom field

  • Hey guys,

    I have a Custom Field Group called Dealers, which contains dealer information as well as their location. I would like to create a page called Find a Dealer; which will have the following structure:

    Location 1
    -list dealers-

    Location 2
    -list dealers-

    Location 3
    -list dealers-

    I know how to output all the dealers onto the page, but how would I organize them into sections based on the location custom field?

    Thanks so much in advance!

  • You’d need to read all of the values into an array and then sort the array so they are in the right order.

    I may be too late to do so, but this is something that would be more suited to a custom post type “dealer” with a custom taxonomy “location”

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

You must be logged in to reply to this topic.