Hello,
I have created a relationship between two CPT’s - Products and Materials.
Products contain normal custom fields such as product name, price, description etc. and a relationship-field (Post-Object) filtered by Materials post type.
Materials contain multiple fields such as material name, id, description etc.
One material can be related to multiple products, but a product can only be related to one material.
My issue:
I have created a layout for Products and I’m able to pull in the information from the Materials CPT. My problem is that it always pulls the latest added material and not the related material.
How everything is set up:
I’ve got a Div (Material info) set as both a Provider (Query string:
post_type=materialer&posts_per_page=1&offset=0&ignore_sticky_posts=1&post_not_in%5B0%5D={{dc:looper:item}}
) and as Consumer.
Inside the Div I got 3 text-fields
{{dc:acf:post_field field=“materiale_id”}}
{{dc:acf:post_field field=“materiale_navn”}}
{{dc:acf:post_field field=“materiale_beskrivelse”}}
I’m pretty new to query strings so it might be a rookie mistake, but I just can’t seem to figure it out.
PS: The CPT’s are in Danish so Products is called Produkter and Materials is called Materialer.