ACF fields not outputting the value on frontend

Hey I’ve created a field group in ACF and added a text field for a page.
I tried to add that field’s value on the frontend by simply adding a command {{acf: my_field_name}}, but it is not showing any value on the frontend.
I’ve added this code in HTML type block of a theme. Please help me with outputting the value on page.

The fields settings are as follows:

and the block where i’m adding this shown in below image:

Hey Ketan,

Thanks for reaching out!

To investigate why your ACF field is not outputting on the frontend, we need to check your backend setting properly. To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thank you.

This text field is visible now but the other fields such as image or wysiwig editor fields are not displaying its data on single product page. Please look into this. Here is my site’s credentials and url.

Hey Ketan,

Thanks for reaching out!

I’ve checked your products and found out that you haven’t added any data to your image and WYSIWYG ACF field. That being said, I’ve added sample data for the image and WYSIWYG for the WAFFLE® Assure Surgery Table Straps product.

Then in your single WooCommerce layout, I’ve set the preview to the said product.

I’ve found out that you added the ACF image dynamic code directly to the raw content( detail image ). {{acf:product_detail_image}}. Instead of using the raw content in outputting your image, you should use the image element and then paste the dynamic content code in the source. I’ve created an example for you called Themeco Image.

Then in the WYSIWYG, I’ve also created an example called Themeco WYSIWYG.

Hope that helps.

1 Like

Hey, Many Many thanks for your help.
Please help me with the table field too. Like how can I add the ACF table field on this product page. You can see this above product only to check with the table. And how to add the shortcode via the acf field for a product.

Hello Ketan,

I have checked the documentation of ACF Pro it does not provide any information about the Table field type. Since you are using the WooCommerce plugin, it is best you place the product attributes in the correct way instead of adding them as a, ACF field. Perhaps this documentation can help:

Best Regards.

Hey, the above suggested article didn’t solve my problem. I did some research and find out that THMECO provides the functionality of loopers and ACF provides the functionality of repeater’s filed.
After so many trials of configuring the repeater field I’m unable to output the values of repeater block on front end.
Please help me with the configuration of same. I tried with the documentation which are provided by the THEMECO for loopers but I think I’m missing some settings.
Here is an elaboration of my need with front-end output.
The below image shows what I want to achieve. It is a simple table structure which holds the different values for all the products(dynamic content of product so added an ACF repeater field to add rows in backend of product edit screen) present in woocommerce.

I’ve created an ACF field of repeater field type and added the sub fields for it. All the sub fields are of text type only. please see the below image for configuration of ACF Repeater Field.
here’s a link for accessing the field group. Link: https://ehob.vks.group/wp-admin/post.php?post=676&action=edit
you can find the credentials and other details for admin login in secure note in above messages.

now this second image is showing what all fields I’ve added for a moment with the product: https://ehob.vks.group/wp-admin/post.php?post=522&action=edit (product edit link in case you need to see the product)

link of layout page of a single product page - https://ehob.vks.group/cornerstone/edit/702, here I’ve set a looper consumer by adding dynamic content in the looper provider.
image

But now it is not displaying any output on the frontend. I know i need to configure it’s fields value so that it will output the content on front end I tried with all the available documents and articles but not helped me in a way I want.

Please help me in configuring this repeater field with THEMECO theme’s dynamic content. It would be great help.

Many Thanks in Advance

Hello Ketan,

I would highly recommend that you check out this video:

Best Regards.

Hey Marc you’ve helped me for these fields amazingly. Can you please help me in outputting the repeater’s values on frontend. I’ve tried with the video tutorials but not able to get the exact results which I want. The way you helped me for image and wysiwig fields is outstanding. Pleas let me know how to output a table via a repeater field. For reference please see my last sent message.

Hey Ketan,

I’ve created an example to display the repeater field.

For your future reference, you can check here is the structure:

Row: Looper Provider Dynamic Content {{dc:acf:post_field field=“test_product_specs_repeater”}} and at the same time, it is also the Looper Provider.

I added a column and inside the column, it is a text field with dynamic content

Code: {{dc:looper:field key="code"}}
Description: {{dc:looper:field key="description"}}
Size: {{dc:looper:field key="size"}}
Weight: {{dc:looper:field key="weight"}}

You can check this article as reference: https://theme.co/docs/acf-pro-and-loopers#custom-repeaters

Hope that helps.

Hey marc,
Thanks a lot for your great help. I’ve one more questions and that is how to output the result of a shortcode with acf field or via theme elements itself. like I can just directly put a shortcode in any element or there is any specific process.

Thanks & Regards
Kinsey locke

Hey Kinsey locke,

I appreciate your question, but I’m not entirely clear on what you’re asking. Could you please provide more details or clarify your question? That way, we can assist you more effectively.

Thank you.

Hey, I think the issue was with the shortcode itself. I tried to display other shortcode’s data and it worked.

Hey Kinsey locke,

We’re glad that it is now working properly on your end.

Thank you.

Hey I need help with the file type of ACF field. What I did is I’ve created an acf field group which is having an file type field in it and that is for post type Post. Till here it is working fine.
Now I output this file on frontend via using the command {{acf:name-of-field-label}} it outputs the file correctly on frontend too. But I want if the file is present with the particular post than only the icon of which I specifies for this will be visible on frontend. If admin don’t add any file with any of the blog post that icon should not be visible on the front end of that particular blog post.

Please help me to achieve that if the pdf file is added with the blog than only the icon will be visible to users on frontend.

Thanks & Regards
Kinsey Locke

Hey Kinsey Locke,

If you are using an icon to output the file, you need to add a condition to the element. Something like this one:

image

This will check if the post has a file.

Hope that helps.

Hey Thanks for your help. But I’m not able to find the given option which you shown in above image. I went through the documentation and tried to set the condition for that column element. But it is not working as expected.
condition which I set is


whereas the “pdf for blogs” is the field group whcih I’ve created for the posts.
Field group

I’m having 2 posts A & B. For post A i’ve added the pdf and for post B I didn’t add any pdf .I placed that condition which is shown in above image but that is not working as expected. Please let me know what I’m missing to display icon only in that post which consists the pdf.

I did this changes please check this too. File added with the post A


Structure of row element
image
Put an condition with string type on column1

But still this is not working as I want.

Hey Ketan,

The dynamic content code is wrong and the same with the condition. That being said, we need to check your backend setup properly. That being said, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password
  • Page URL or Layout Name

You can find the Secure Note button at the bottom of your posts.

Thank you.

please check the following details in the secure note.