AFC Cornerstone Integration not working

I am trying to populate cornerstone fields with content from the AFC plugin. However when I follow the AFC Cornerstone Integration guidelines (see below) all I get is the shortcode text “{{acf:field_name}}” not the content from AFC.

I have set up a custom template and have AFC set to show input fields when a page is set to that template. I can pull the values directly from the custom template php so I know they are working on the page. These are just basic text values not images.

Here is my custom template code

<?php while ( have_posts() ) : the_post(); ?>

  <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <p><?php the_field('c_name'); ?></p>
      <p><?php the_field('c_city'); ?></p>
      <p><?php the_field('c_pricing'); ?></p>
      <p><?php the_field('c_blurb'); ?></p>
      <p><?php the_field('c_address'); ?></p>
      <p><?php the_field('c_phone'); ?></p>
      <p><?php the_field('c_email'); ?></p>
    <?php x_get_view( 'global', '_content', 'the-content' ); ?>
  </article>

<?php endwhile; ?>

Thanks for looking,
Eric

Cornerstone Integration
We’ve included a basic ACF Pro integration with Cornerstone which allows you to use a shortcode within your pages and posts created with Cornerstone to automatically pull through the value of your ACF Pro custom field without having to modify template files.

You’d use:

{{acf:field_name}}

Hello There,

Thanks for writing in! Your custom template will display fields outside of Cornerstone. What you are doing is just that you are using the code to display your fields as stated in the knowledge base (https://theme.co/apex/forum/t/integrated-plugins-acf-pro/49).

This is not how you integrate ACF in Cornerstone. The correct way is by designing your post/page first in Cornerstone and use a text element or other element and insert the shortcode in the content area.

Hope this helps.

@RueNel,
Thanks for the tip … have it working both ways now!

Eric

You’re always welcome Eric!

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.