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

Display Image associated to Custom Taxonomy

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Display Image associated to Custom Taxonomy

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18543
    samyagshahsamyagshah
    Participant

    Hi There,

    I am really enjoying setting up the Ajax Search Pro Plugin. I have hit a small glitch though. From what I can see in search results image associated to Custom Taxonomy is not displayed.

    I have created one Custom Taxonomy & an image meta key is associated to it which is stored in database table “TermMeta”. In search results Title of Custom Taxonomy is displayed but an image associated to it is not displayed. To add more image associated to Products, Products Categories is displayed in search results but for Custom Taxonomy its not displayed.

    Thanks

    #18546
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thank you for your kind words again 🙂

    Well, WordPress does not have an ‘official’ method of storing term images, usually plugins are being used for this purpose. Some of these are natively supported by the search, but it is painful to maintain all of that. I hope WordPress decides to add a native method to store images with terms in the future.

    Anyways, getting those images should be possible with a small custom code snipped. Can you please tell me what the meta key is, and if it stores the image URL or the image attachment ID? With that, I could construct a small script that will fill those images during the post-process.

    #18548
    samyagshahsamyagshah
    Participant

    Thanks for quick reply.

    Required meta key is “_wcbs_producer_picture” & value stored is attachment ID.

    Thanks

    #18565
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I wasn’t able to test this obviously, but it should very likely do the trick:

    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!

    #18578
    samyagshahsamyagshah
    Participant

    Thanks. Its working. Appreciate your help.

    #18580
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Display Image associated to Custom Taxonomy’ is closed to new replies.