Home Forums Backend Issues (wp-admin) ACF Fields to select values from a post_object


ACF Fields to select values from a post_object

  • Hello, I am wondering if this is even possible within ACF.

    I am working on a basic product catalog for car parts. (Not Ecommerce, just selecting and displaying products)

    I have two custom post types, car-parts and car-models. Car models has two taxonomies, make and year. Car-parts has one taxonomy, part-categories.

    Each model vehicle can have any combination of years that it belongs to, with only one “post” being created per model, and the years being stored in the “year” taxonomy. Each part can have any combination of models that it belongs too, however a part doesn’t necessarily fit each year.

    Selecting a model is pretty simple, just use the post_object field. My next question is this: is there any way to build a dropdown / checkbox style list of applicable years for a given model? So, Ideally, I would wrap the models (for each unique part) in a repeater row, and once you select the model, you would then get a dropdown list with applicable years for that model.


  • Hi @idealbrandon

    If you’re not too concerned with being able to select the “wrong” years for a model you could just create a taxonomy field to go along with the model post object field in the repeater. Then as you loop through the info on the frontend you’d just output the model post object field and the years selected with that.

    Another way would be to also connect the years taxonomy to the parts CPT and just select the years as a regular taxonomy meta box (not sure if that works with your setup.. not that good at autoparts).

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

The topic ‘ACF Fields to select values from a post_object’ is closed to new replies.