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

Custom Taxomony image in seearch results

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9236
    smicklesmickle
    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 9 years, 11 months ago by smicklesmickle.
    #9245
    Ernest MarcinkoErnest Marcinko
    Keymaster

    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 🙂

    #9263
    smicklesmickle
    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
    Ernest MarcinkoErnest Marcinko
    Keymaster

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom Taxomony image in seearch results’ is closed to new replies.