
Most people who are using ACF are also customizing themes or building custom themes so they’re often using a code editor independently of WordPress. There’s a billion ways to build in WordPress so what theme you’re using, whether you’re using a page builder or not, whether you’re using the block editor or still using classic, specific plugins, etc. beyond just your skill (beginner vs advanced user) all factors in to what is the best or “easiest” way.
If you don’t want to edit code, I’d look at displaying ACF using a shortcode: https://www.advancedcustomfields.com/resources/shortcode/
Depending on what you’re using, there could be a better way as many, many tools integrate with ACF.

I don’t think they are saying anything different. What is important is keeping the meta key in the database unique for any WP object. For example, for a post, term, user, options.
This is how meta keys are determined and all the entries you will find in the DB
Top Level Field (field that is not a sub field of another fields) All top level fields stored for the same type of WP object must be unique: "{$field_name}";
Sub fields of a repeater, this includes repeaters and flexible content: "{$repeater_field_name}" AND "{$repeater_field_name}_{$row_index}_{$sub_field_name}"
Group Fields, group fields are a special kind of repeater that always has exactly 1 row: "{$group_field_name}" AND "{$group_field_name}_{$sub_field_name}"
Clone Fields: Clone fields are more complicated because how they are stored is determined by the display setting. When using “Seamless Display” Cloned Fields work like top level fields or like sub fields of the type of parent field they are cloned into. When using “Group” display fields in them work like sub fields of Group Fields.
Everything can be nested, for example if you have a field that is in a repeater and the repeater is in a group field and that group field is a sub field of a flex field then the field key of the final field would be
"{$flex_field_name}_{$row_index}_{$group_field_name}_{$repeater_field_name}_{$row_index}_{$sub_field_name}"
As you can see by the above, with a unique top level field name there should never be a conflict and as long as the top level field name is not duplicated on the current WP Object, there should not be a conflict.
With top level repeater fields of different names and/or fields stored for multiple things like one field on a term and one field on a post there are 2 things that can cause them to go wrong when using them in the same template.
1) Using the second repeater before you are done looping over the first repeater. This will cause ACF to loose track of the first repeater when the second loop begins.
2) Not specifying the correct $post_id when starting the loop over a repeater.
Because you are using elementor I cannot tell you if either of these 2 things are happening. But what I can tell you is that you will have an extremely difficult time displaying fields for a post on template designed for a term and you will have a difficult time displaying fields for a term on a template designed for a post.
On a term template (archive) the correct $post_id must be supplied for both the post and the term. ACF should be able to determine the Post ID of the post if you are in a loop over the posts. The $post_id of the term must always be specified.
On a post template (single post) the $post_id for the term ACF will be able to determine the post ID of the current post. The $post_id of the term must always be specified.

You’re form is not being initialized properly.
Calling acf_form_head() on the page adds JavaScript. This JavaScript initializes the ACF form when the document is loaded. Since you are adding the form later it does not exist when ACF initialization is run.
There is documentation on steps you must perform when showing a form in a modal.

What do you mean by “template”? You cannot use tags like <!-- wp:acf/left_text --> in a php template.
https://www.advancedcustomfields.com/resources/displaying-custom-field-values-in-your-theme/

What John noted, the error in your code, does exist, you’re going to want to change the_field to get_field. However, because you said this is also within a block and none of your fields are displaying, not just the image due to said error, it’s because you do need to pass the ID when using the_field, as well, so I would try something like:
$image = get_field('partner_logo',get_the_ID());
And ensure the ID is getting passed on any calls within a loop in an ACF block.
Thanks for the screenshots, that makes it much clearer what you’re trying to do.
My assumption about why this might not be working for you is that that dynamic content setting is probably looking for that ACF field on the current product since you’ve created a product loop. But that feels doesn’t exist alongside products, it exists alongside a taxonomy term that happens to be applied to that product, so Elementor doesn’t know where to look to find that field data. I could be wrong; like I said I don’t have experience with Elementor Custom Skin to know exactly how it works in this scenario.
This is why I’m thinking that L&L might be a solution that could work for you if you’re comfortable displaying your image by writing a line or two of HTML instead of using Elementor’s editor. The markup I shared above could be placed inside an L&L template and then that template could be run within your loop using either a shortcode or the built-in Elementor widget. Essentially what it’s doing is saying “hey WordPress, look through the taxonomy terms associated with the current post/product in the brand taxonomy and then for each term that’s applied to this post, get me the logo image field for that taxonomy term.” Considering the actual field/taxonomy names you showed in your screenshot, that might look something like this in your case:
<Loop taxonomy=brand post=current>
<img src="{Field acf_image=logo field=url}" />
</Loop>
Can’t help you much beyond that, but there’s a good chance that this template above will just work out of the box if you place it inside your loop using any of the methods I linked above. I hope that’s helpful for you, let me know how this goes!
Hmm I’m sorry, thought I explained it clearly so I’m not sure what more information I can add to that.
So there’s nothing in ACF to display the submitted forms in detail without having to click on a modal pop-up button?
I’m sure I can grab the submitted information for a specific form and loop through it displaying the fields wherever I want, right? I’m just having issues displaying submitted forms wherever I’d like to on a page with all the information shown without having to click on a button to pop up the information on a modal.
I think I just need a way to grab all submission fields on a form and display them directly on a page. Kind of like how the list does already, but instead of just a title and a Review button, I’d like the title and all other fields displayed.
Even if the solution is through php or javascript, I just need nudged in the right direction.
Thank you!

The ACF JS API is not for use on the front end. It is only for the admin when editing acf fields and not for displaying values of fields on the front end.
I was actually too hasty on this and I can’t edit it anymore. The post object field is accepting the value of $postid formatted as an int, but it’s not displaying in the edit post screen, it’s just showing up as an empty field.

Some code used for displaying the promo would be helpful.
Without that.
1) Create another field to hold the custom title, make it conditional on the select field having a value
2)
$custom_title = get_field('custom_title_field');
// maybe get the promo to show
// somewhere in that code
if (!empty($custom_title) {
echo $custom_title;
} else {
echo $whatever_should_be_shown_normally;
}
Hello @John,
many thanks for your answer.
I’m sorry, I didn’t explain well how I did and what are my goals.
Here is a diagram of what I did.

The idea is to make relationship between custom posts and their own options fields.
For example with three custom posts which display their own informations/values from options fields.
CTP 1 -> repeater “Subject” row[1] -> Title, description, textfield, etc. and from the other repeater field “Location/Town” row[4].
CTP 2 -> repeater “Subject” row[4] -> Title, description, textfield, etc. and from the other repeater field “Location/Town” row[1].
CTP 3 -> repeater “Subject” row[2] -> Title, description, textfield, etc. and from the other repeater field “Location/Town” row[2].
I delete Group field which was unecessary.
I populate title and town from options to my custom post two dedicated radio fields.
Now I’m looking for displaying on the frontend values from options fields that “belong to my custon post”.
Populate not do relationship between CPT and Options.
I tought that with post_id, I’ll be able to display options values like I can do with taxonomies.
Am I wrong ?
I hope it’s more clear…
Let me know.
All the best.
Pierre

The format settings of an ACF field are only applied when using an ACF function to display the value.
I have no idea what “Ele Custom Skin” is but it is displaying the value that is stored in the database, so it is not using an ACF function to do this.
You need to figure out how to use an ACF field in whatever it is that you are using and for that you need to consult the documentation for that application.

Normally this can be done using is_admin() This should be false when displaying a field from a template. The only time it might be for edit when this is false is if you are using an acf_form() on the front of the site. In this case you can optionally add/remove the filter before you call acf_form() depending on whether or not you want the field filtered.

Sorry, I missed that part.
Not really. I tested getting and displaying an options page value on a site when not logged into the site and it’s working as expected, so my test did not rely on the user type.
Is there anything in the code for adding the field group or fields that’s dependent on the user type or if the user is logged in or if the page is and admin page? Conditionally creating fields could cause this depending on the condition.
EDIT –
It actually is working sorry! It wasn’t displaying for an entirely different reason
Apologies
*** original question ***
Hi John
I know this solution is really old but is it still valid?
I am trying to get it to work with a slider using a repeater field from an ACF options page like below but it returns nothing?
I cant see what I am doing wrong
<section class="latest-publications">
<h2>Latest Publications</h2>
<div class="pink-divider"></div>
<div class="publications-row">
<div class="posts-carousel">
<?php if (have_rows('publication', 'option' )) {
$count = 1;
while (have_rows('publication', 'option')) {
the_row();
?>
<div class='publication-slide'>
<a href="/publications#<?php echo sanitize_title( get_sub_field( 'publication_title' )); ?>" target="_blank"><?php the_sub_field( 'publication_title' ); ?></a></h4>
<?php the_sub_field( 'publication_description' ); ?>
<p class="icon-date"><?php the_sub_field( 'date' ); ?></p>
</div>
<?php $count++;
if ($count > 3) {
break;
}
}
}
?>
</div>
</div>
</section>

ACF fields do not automatically appear on the front end of the site
https://www.advancedcustomfields.com/resources/displaying-custom-field-values-in-your-theme/
Sorry, John – thank you for replying though. I’ve since solved my question and have them displayed…just a little different than I like. For some reason this code:
<h3>Resources</h3>
<!-- -->
<?php
$resourcestest = get_posts(array(
'post_type' => 'resources',
'meta_query' => array(
array(
'key' => 'schoolservice', // name of custom field
'value' => '"' . get_the_ID() . '"', // matches exactly "123", not just 123. This prevents a match for "1234"
'compare' => 'LIKE'
)
)
));
?>
<?php if( $resourcestest ): ?>
<ul>
<?php foreach( $resourcestest as $thisresource ): ?>
<li>
<a>ID ); ?>">
<?php echo get_the_title( $thisresource->ID ); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<!-- -->
is displaying on 5 of the 7 Resources I have. No matter what I do…only 5.
I’m still debugging but if you have insight that’d be wonderful.
Thank you!
D

As I said, the ACF JS API cannot be used for displaying data. The input field must be on the page, which it is not on the front of the site unless this is an ACF form.
I don’t know how else to explain this. ACF JS functions are for making changes in the admin or when editing content, not for displaying content.
Where you are doing this var field = acf.getField('fork_model'); you need to make an AJAX request to the server to get the data.

acf/render_field is an action hook and there is nothing that can be filtered. This hook passes the $field array to your function. I have no idea what this is doing on the front end but it’s not doing what you think it’s doing. This hook is only run when displaying a field for input.

While this would be nice, this is not something that ACF is actually validating or forcing. The protocol needing to be entered is something that the browser is doing. ACF uses <input type="url"> and this causes the browser to do validation. You can test this by creating a simple html page with a form and a url input.
ACF is only catching the error already produced and displaying it in the same way as other errors for other fields.
I generally use a text type field for URLs and do my own validation with an acf/validate_value filter so that I can allow clients to enter any valid href value.
function validate_text_as_href($valid, $value, $field, $input) {
if (!$valid) {
return $valid;
}
if (!empty($value)) {
if (!preg_match('%^(https?\://|ftp\://|/|#|mailto\:|sms\:|tel\:)%', $value)) {
$valid = 'Enter a Valid HREF Value';
}
}
return $valid;
}

I am not sure you can set a default image.
I think that your template should take care of this for you. I would just setup ACF option with the default image (or define a variable in your template if it’s not something that your client needs to change).
When you are displaying the logo, you can do something like this:
if ( '' === get_field( 'logo' ) {
$image_url = get_field( 'default_image', 'option' );
// Render the default image.
}
Non option version:
$default_image = (your default image URI);
if ( '' === get_field( 'logo' ) {
// Render the default image using $default_image
}
When a new post is created doing the sync, what happens?
First round is that it creates a draft, which is normal for the plugin.
When an existing post is updated and fields that did not have values are populated, what happens?
I can see the new text when viewing the post in the back end, but it does not become visible on the front-end until manually clicking publish.
When an existing post is updated and fields that did not have values are populated, what happens?
Same as above.
What type of fields are they?
Text and text area. Not sub-fields.
Just did another test… a post listed as being published:
https://sanktoberholz.de/wp-content/uploads/2021/09/Screen-Shot-2021-09-06-at-4.24.39-PM.png
And yet isn’t visible via post query until I hit Update again. Here’s the post query that I’m using, which shows a meta query for displaying only those that have been marked as a specific category (in Salesforce, not a WP category) and a checkbox for whether to make the post visible. (Its for a rudimentary inventory management process.)
<?php
$args = array( 'posts_per_page' => -1, 'post_type' => 'assets',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'area',
'value' => '["MITTE"]',
'compare' => '='
),
array(
'key' => 'show_on_website',
'value' => 1,
'compare' => '='
)
)
);
$myposts = get_posts( $args );
if($myposts):
foreach ( $myposts as $post ) : setup_postdata( $post );
?>
Just to let you know that I have found out what was causing the error and it was something as simple as I had no content inserted into the custom post types which is why it was not displaying the associated custo fields!
Feeling a little bit silly now!
I’m using ACF Pro. I’ve not installed any extra addons, however I see that the repeater field is supposed to be an addon?
One of the field groups has a repeater field. However when the fields are displaying, the repeater field is still enabled.
I have the same issue,
New site. ACF is installed and my custom fields are imported from the themes acf-json folder.
The ACF fields were exported from one site and imported into the other.
I exported my pages from the old site, imported (standard WP Import) them into the new one.
When I view the page on the backend I can see everything displaying correctly but nothing shows until I update the page.
I don’t know if it helps, but none of the imported pages have content in the main body, they are 100% ACF pages.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.