image search custom field

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14843
    pixelapixel
    pixelapixel
    Participant

    Hello!
    I want to put in the search image of the articles a custom field of each article that contains an image. Is it done as in catch? It does not work for me. 🙁

    Attachments:
    You must be logged in to view attached files.
    #14846
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Does the field contain the image URL or the image ID?

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #14852
    pixelapixel
    pixelapixel
    Participant

    91/5000
    I send you the captures:
    Capture 1: Custom Field
    Capture 2: Custom field php

    Attachments:
    You must be logged in to view attached files.
    #14864
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh, okay, so based on the code this is not just a custom field, but a sub-field for a ACF repeater field. That means that the image is not stored within that field name, but this is used to store multiple (repetitive) images for rows within the post.

    Can you please try this configuration: https://i.imgur.com/SDuvsU8.png

    It might be able to get the image from the filtered content. If that does not work I will try to construct a custom code to somehow get the first sub field, but I’m not sure if that is possible outside the post loop.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.