Custom Taxomony image in seearch results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Custom Taxomony image in seearch results

This topic contains 3 replies, has 2 voices, and was last updated by

 
Keymaster
5 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9236

    Participant

    Hi,

    First off – love the plugin. I hate posting for help in these things. But needs must!

    I have a theme that creates a custom taxonomy – this is easily found within the search function of episode-categories.

    What I’d like is to pull in the image for the category. I’ve tried the following

    • attaching image to category
    • using ACF to attach specific images to each category and requesting it searches for podcastfeaturedimage or various custom fields on the category

    I tried adding https://wp-dreams.com/knowledge-base/advanced-custom-fields-image-field-as-image/ to my functions – but to no avail.

    Please could you help me on this.

    • This topic was modified 5 years, 6 months ago by  smickle.
    #9245

    Hi!

    Thank you very much for your kind words, and for the proper details and access.

    I’ve looked up the ACF documentation on how to get the image fields based on the taxonomy and the term ID, and I successfully put together a small snippet that parses the images correctly. For future reference, this is the code I put in your theme functions.php file:

    I hope this solved the problem 🙂

    Best,
    Ernest Marcinko

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


    #9263

    Participant

    Wow this is perfect! thank you so much!

    Ironically i’d just used something similar on a category page as I wasn’t able to get images/custom fields from a custom taxonomy.

    Thanks again 🙂

    #9264

    You are welcome, I’m happy to help 🙂

    If you don’t mind I will close this topic and mark it as resolved for now, feel free to open another one if you have other issues.

    If you like the plugin, feel free to rate it on your codecanyon downloads page, it’s greatly appreciated.

    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)

The topic ‘Custom Taxomony image in seearch results’ is closed to new replies.