Support » Plugin: Cat + Tag Filter » Search text in specified categories/tags

  • socorrista22198


    Hi ajayver, how could we implement to this wonderful plugin the hability to search text inside selected categories or tags?

    For example, the user writes the words to search, and also selects in what category and tag the program would search those words.

    Is like merge the default wordpress search function with this plugin, Is it posible?

    Best regards

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


    You can try putting this lines

    if (is_category()){ ?>
        <input type="hidden" name="category_name" value="<?php echo get_query_var('category_name'); ?>"/>
    if (is_tag()){ ?>
        <input type="hidden" name="tag" value="<?php echo get_query_var('tag'); ?>" />
    <?php } ?>

    inside your search form.

    That code is only for search at the same category/tag always dont? the user of the page couldn´t be able to select the category and tag where to search the text.

    Cat-tag-filter-widget is able to select a category and tag using dropdowns, but can´t search the text typed in a textfield.

    Is posible to add a text field to this widget? So the user would be able to type a text, and the search of that text would be only inside the posts/pages belonging the category and tag selected at the dropdowns.

    Plugin Author ajayver


    It is possible, but it will be easier to write this code from scratch. All you need to do is to generate a url like[category]&tag=[tag]&s=[search query]

    Okay I don´t know a lot about programation, I hope someone do what you said “to write code from scratch” for generate the url.

    Anyway, thanks a lot for you time and wonderful plugin.
    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search text in specified categories/tags’ is closed to new replies.