This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Problem to display an image with url in custom field

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Problem to display an image with url in custom field

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19134
    emirartemirart
    Participant

    Hello !

    I have an issue with the image option : the URL of the target image is stored in a custom field (“user-image-url”, it should be the image of a person) but the target picture is not displayed.

    I configured the plugin with the choice “custom field” (see attachment 1) but, I don’t know why, the target image is not displayed and this is the default picture that is display instead (see attachment 2).
    I tried to display the content of the field : this really is the URL of the photo that is stored (see attachment 3).

    So, I don’t understand why with the right information in the custom field, the picture is not displayed.

    I use the version 4.13.4 of the plugin with the version 4.8.7 of WordPress.
    Thank you in advance for your help.
    Marie

    #19139
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    May I ask what is the result type in this case? (post, page, custom post type, user etc..)

    Can you please also add temporary FTP and back-end access, so I can debug the code if neccessary and take a look at your configuration. Thank you!

    #19141
    emirartemirart
    Participant

    Hi !

    Yes, here a little more context : the page is a member directory, so it’s a user search.
    There is only the search bar and the results suggestions in the page.
    I followed your tutorial “staff research and filter” (https://wp-dreams.com/knowledge-base/demo-setup-staff-search-and-filter/) so the cards are results propositions I guess. It’s no clickable, just information.
    Almost all the information is stored in custom fields and except for the picture I don’t have any other problem (see attachment 3 and 4).

    Other plugins installed : ACF Pro(almost all the site is based on this plugin), Cookie notice, Yoast SEO, Wordfence, GA, Export Users to CSV, Members, SVG Support.

    Do you need other informations ?

    For FTP and access information, I’m waiting for a validation from my clients, to know if they accept that I give you this information. I let you know when I have their answer.
    But would you be able to give me some answers without that ?

    Thank you,
    Marie

    #19146
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Thank you.

    That is the problem then. The custom field on image options only works with post meta, but not user metadata. I think however it might be possible to resolve without access, using a custom code.

    I have made a custom snippet to try. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    This will parse the user meta from the image field, and change the image to it if available.

    #19215
    emirartemirart
    Participant

    Hello !

    And sorry for the delay of my response.
    Your solution works very well, thank you for your help !!

    Have a nice day,
    Marie

    #19227
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Problem to display an image with url in custom field’ is closed to new replies.