Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › ACF – Relationship Field › Reply To: ACF – Relationship Field
As you state:
“they store serialized information as a reference to some other field/object”
is there a way to add that code into your plugin so it knows how to translate them?
This is the code i use to have them show up as text within my template file: (twig)
{% for item in post.get_field(‘manufacturer’) %}
Here’s the full php call:
<?php $manufacturer = get_field( ‘manufacturer’ ); ?>
<?php if ( $manufacturer ): ?>
<?php foreach ( $manufacturer as $post ): ?>
<?php setup_postdata ($post); ?>
“><?php the_title(); ?>
<?php endforeach; ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?
Heres a link to their documentation if that helps:
https://www.advancedcustomfields.com/resources/relationship/
https://www.advancedcustomfields.com/resources/acf-fields-relationship-result/