Tell us what you are trying to do?
I am trying to create a template for my search result and I want to use a custom field image in the cards.
Is there any documentation that you are following?
I have tried all the solution that I could find on the website but couldn't actually make it work.
I am using ACF pro to generate my custom fields. I have a field with field label as Coach_Profile_Picture and field Name as coach_profile.
Is there a similar example that we can see?
What is the link to your site?
hidden link This is the page where I am trying to get the template to work.
Hello,
It's been a while. Any update on the issue?
Hi Puneet,
Thank you for waiting.
Since the "Coach_Profile_Picture" field that you're using is added through, ACF plugin, it returns the ID of the image and not the URL, if you'll try to call it using the Toolset's shortcode [wpv-post-field]. This is because the ACF plugin stores the ID of the image in case of the image type custom field.
As you need the URL and not the ID of the image, you can follow these steps:
1. Please go to your "Coach_Profile_Picture" field's settings and set it to return "Image URL" and not "Image Array".
( screenshot: hidden link )
2. Next, in your view "learning course", you can replace the Toolset's shortcode with the one from the ACF:
Changing:
<img src='[wpv-post-field name="coach_profile" alt="Profile Image" width="100" height="100" resize="crop" url="true"]' align="center"/>
To:
<img src='[acf field="coach_profile" post_id="[wpv-post-id]"]' align="center"/>
You can read more details on the topic from the ACF plugin's official documentation:
hidden link
hidden link
Note: to get more most accurate and up-to-date information related to features of a third-party plugin like ACF, we'll recommend consulting its official documentation and support.
I hope this helps.
regards,
Waqar
My issue is resolved now. Thank you!