I am pretty new to ACF, but have successfully integrated it into many pages on my site. I recently purchased and downloaded the ‘options’ add-on. I can set up an advanced custom field and add information to it via the options page, but when I call a field into my site with PHP, just as I before with fields created on certain pages, nothing displays.
An example of how I am calling in a field:
<a href='<?php the_field('logo_1_link'); ?>'><img src='<?php the_field('logo_1_image'); ?>'alt=''/></a>
here is another:
<h2><?php the_field('fest_date'); ?></h2>
<a href='http://google.com'>
<h3><?php the_field('fest_price'); ?></h3>
</a>
Neither of these are displaying… I’m 100% sure the field names are correct
Any idea what I could be doing wrong… Again, it only happens with fields created on the options page.
I think your problem is the missing ‘option’ parameter like this:
<p><?php the_field(‘fest_date’, ‘option’); ?></p>
From the docs:
Template Usage
All the API functions can be used with the “Options Page’s” fields. However, a second parameter is required to target the options page. This is similar to passing through a post_id to target a specific post object.
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-an-options-page/