Hello,
I am setting up a site (dentist directory) with GP/GB, ACF, and CPT UI. I am however not too experienced with GP/ACF and WP-dev in general so my approach might be off – but there is only one way to learn.
I already have my data imported into the following (simplified) structure:
(Post Type/Field group: Custom fields)
Dentists: Id, OrganizationId, Name
Products: Id, OrganizationId, ProductName
Dentists_Products: Id, OrganizationId, ToPrice
In the field group “Dentists” I have created a relationship field named “Products” and added “Products” and “Dentists_Products” to “Filter by Post Type”. The return format is set to “Post object”
In elements, I created a content template named “Dentist content” and inside that, I have added the following shortcode in a p-tag – just for testing, that data is coming through.
[relationship field="products" post_type="dentists_products" filters="organizationid=<?php the_ID(); ?>"]
[loop]
[acf field="productname"]: [acf field="toprice"]
[/loop]
[/relationship]
But when I go to one of the pages for a dentist I get this printed out:
[relationship field="products" post_type="dentists_products" filters="organizationid="]
[loop]
:
[/loop]
[/relationship]
So for some reason, the shortcode is not being recognized. Can anyone point me in the right direction?
Best Regards!
Ossian