ACF fields not outputting the value on frontend

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.

Hello Ketan,

Using {{dc:acf:post_field field="pdf_attchment_for_blog"}}, you should be able to get the PDF file. If you are trying to display the PDF file itself, WordPress does not do that. You will have to install a PDF viewer plugin to be able to do so.

Best Regards.

Hey, Thanks for your help.
No I’m not displaying any pdf on frontend. I just want to display an icon of download if the pdf is being attached with the post.
To attach the pdf with the post I’ve used the file type field of ACF plugin. So I just need if the file is attached with any of the post than that post will show the download icon on front-end, if not contains any pdf than the icon will be hidden. So that when user clicks on the download icon it will be download the attach pdf and this is the default functionality of attaching any file. and it is working too. I just want to know how to hide/show download icon on the posts with or without any pdf being attched with the any post.

Hello Ketan,

You will just have to use the String condition added to the Icon element:
{{dc:acf:post_field field="pdf_attchment_for_blog"}} is not blank.

Best Regards.

1 Like

Hey, Thanks you for this help. Now it is working as my need.

Hey Ketan,

You’re most welcome!

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