• Resolved deepbevel

    (@deepbevel)


    I read a support thread here from about a year ago where someone asked how we might display the names of the searched taxonomies on the search results page, there was mention of a shortcode coming which might achieve this, so I’m wondering if it is available. If not, I’ll accept long-code solutions too!
    Thanks!

    https://www.ads-software.com/plugins/search-filter/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author DesignsAndCode

    (@designsandcode)

    Hi there

    We have functions for this in Pro but no in S&F free.

    With S&F free though, you can usually just use a combination of WP functions to find out what has been searched for.

    To find out taxonomies you would probably need this function:
    https://codex.www.ads-software.com/Function_Reference/is_tax

    Thanks

    Thread Starter deepbevel

    (@deepbevel)

    I did it myself once and it wasn’t hard, I just can’t remember how I did it. I think is_tax only checks for a specific taxonomy, so I’d have to indicate all my taxonomies and have conditionals for each.
    Thanks anyway.

    Plugin Author DesignsAndCode

    (@designsandcode)

    Ah you might be right, actually I think its in the query object,

    global $wp_query;
    var_dump($wp_query->query);

    ??

    Thread Starter deepbevel

    (@deepbevel)

    It only finds one taxonomy. If it’s a category and tag search, it only finds the category. If it’s a tag search, it will find the tag. But it won’t find both at once.
    if I at least just use the_category and the_tags in archives.php, it at least shows what is current, and so of course includes the search terms. That may be good enough. I like trying to figure it out but if I really need it I’ll go pro.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display searched taxonomy names on results page’ is closed to new replies.