When we make a video ACF field for the products and attached to the product layout for the front end

"When we create a video Advanced Custom Fields (ACF) for the products and attach it to the product layout for the front end, if there are 5 products, some may have a video while others may not. In such cases, the front end displays blank space, as shown in the image below:

If the ACF field is empty for certain products, the front end will show blank space for those specific products. Is it possible to have the content in the ACF fields displayed only when there is content available? In other words, if there is no content in the ACF fields, it should not show blank space on the front end in that particular place."

Hello @vks_group,

Thanks for writing to us.

I would suggest you go to the element where you have pulled the video —>customize —>condtions —>select the condition type as a string. Set the conditions like this. Insert the dynamic content code for the video URL is not blank.

If it doesn’t work for you, please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password

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

Thanks

i did this but till it shows blank space in that products which do not have any video like this https://ffstaging.ehob.com/product/waffle-mad-pump/ in this product their is no video but it shows blank space.
i added all the crendentials and urls in secure note

Hello @vks_group,

Thanks for sharing the login details I went ahead and checked your settings it seems that you have added a background on the DIV element and inside the DIV element you have added the Video element so I would suggest you set the condition on the DIV element so that when ACF field is blank the DIV element won’t render.

Thanks

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