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

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

    (@ajayver)

    You can try putting this lines

    <?php
    if (is_category()){ ?>
        <input type="hidden" name="category_name" value="<?php echo get_query_var('category_name'); ?>"/>
    <?php
    }
    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

    (@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 site.com/?category_name=[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.