Search in taxonomies

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4225
    watermelon503
    watermelon503
    Participant

    I’m wondering, is there any way to use the search input to search within taxonomies? I know that you can make a list of checkboxes to search within certain taxonomies in the “Categories & Taxonomies” page, which we’re already using for categories and publishers. However, we want each of our searchable pages to be associated with a number of sponsors, and there are about 2,000 distinct sponsors, so listing all of them just wouldn’t be practical. Would it be possible to make a checkbox that lets the users search in related taxonomies the same way they can search in titles, content, comments, and excerpts?

    #4414
    watermelon503
    watermelon503
    Participant

    Hi, could I just get a response as to whether or not this is possible? My company wants to work quickly on this, and if it isn’t possible, we need to start work on a custom solution.

    #4421
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Sorry about the late answer, I must have missed your ticket somehow.

    There is a way to return taxonomy terms as results. If you go to the General Options -> Sources 2 panel, you can select which taxonomies you want to search, if that’s what you mean.

    Best,
    Ernest Marcinko

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


    #4446
    watermelon503
    watermelon503
    Participant

    Ernest,

    Thanks for the response. Adding the sponsor term in the panel in Sources 2 should be sufficient. However, it appears to be searching by the term’s slug in wp_terms rather than its name. Is there any way to make it do the latter? EDIT: Actually, checking it now, it doesn’t seem to be working on the slug either, or at all, as far as I can tell. Do you know what the problem could be? The search is at http://customcontentonline.com/pdf-search-wp-native/

    Also, is there a way to put a checkbox in the search settings to enable and disable searching in the terms, as there is for searching in titles/content/etc. in the Frontend Search Settings?

    • This reply was modified 7 years, 2 months ago by watermelon503 watermelon503.
    #4460
    watermelon503
    watermelon503
    Participant

    Okay, after messing with the plugin a little more, I’m not sure if the option on Sources 2 is what we’re looking for. It looks like it just enables certain taxonomies as individual search results. What we want is the ability to search for posts that are related to those taxonomies. This is similar to the taxonomy term selectors in Categories & Taxonomies under Frontend Search Settings, but we want the ability to select based on the search text input rather than having to select from a list. Is this possible?

    #4466
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I think what you are looking for is the Search in terms? (categories, tags) option on the General Options – Sources Panel. It will look for terms related to the posts.
    Please note that this might slow down the search function greatly, as the taxonomy-terms table is usually exponentially larger than the posts table.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.