Hi,
I’ve been reading this tutorial:
http://www.advancedcustomfields.com/resources/querying-relationship-fields/
I’m not sure if the relationship field is the best thing for what I’m trying to do so here’s what I’m trying to do. Would love some advice.
I have two pages:
- Cars
- Trucks
“Cars” lists two groups of posts:
- Red
- Car 1
- Car 2
- Camino 1
- Blue
- Post 3
“Trucks” lists two groups of posts:
- Red
- Truck 1
- Truck 2
- Camino 1
- Blue
- Truck 3
So for the cars page, for example, I think I want to query for the post_type
of vehicles
and the meta_value
of vehicle_type
for the meta_key
of cars
.
But then how do I separate list of posts into groups by the field color
and head each group by that field’s value (Red, for example)?