Skip Navigation

[Resolved] Using ACF image field in a vew

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Christopher Amirian 8 months, 4 weeks ago.

Assisted by: Christopher Amirian.

Author
Posts
#2695840

Tell us what you are trying to do?
I'm trying to use an ACF image in a View

Is there any documentation that you are following?
I followed this post https://toolset.com/forums/topic/how-do-display-acf-image-field-in-a-toolset-view/ to create the shortcode and use it in the view with <img src="[get_image_URL_by_ID field='logo']" alt="[wpv-post-title output='sanitize'] Logo" />

It is displaying correctly on page load. However, whenever you change the filters or select a filter, the images disappear.

The front end code goes from
<img decoding="async" src="hidden link" alt="A.Duie Pyle Logo">

to

<img decoding="async" src="" alt="A.Duie Pyle Logo">

It just seems to strip the information out when the filters are changed.

What is the link to your site?
hidden link

#2695982

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

We do not support ACF compatibility with Toolset and the issue that you are experiencing is because you enabled the Ajax loading in the view.

The code you use to show the ACF images work in PHP and shows the images, but if you select a field in the filter it needs Javascript code to access ACF fields via Ajax without a page reload.

This is outside of our support scope. I performed a Google search to help you find a solution if you are familiar with coding:

hidden link

If not, you can consider either hiring a developer:

https://toolset.com/contractors/

Or turn off the Ajax load from the pagination options of the view in question you used to add the filters.

Thanks.