Navigation überspringen

[Gelöst] Using ACF image field in a vew

This support ticket is created vor 1 years, 5 months. There's a good chance that you are reading advice that it now obsolete.

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.

Dieses Thema enthält 1 reply, hat 2 voices.

Zuletzt aktualisiert von Christopher Amirian vor 1 years, 5 months.

Assistiert von: Christopher Amirian.

Author
Artikel
#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="versteckter 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?
versteckter Link

#2695982

Christopher Amirian
Unterstützer

Sprachen: Englisch (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:

versteckter 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.