WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Cat Tag Filter] Exclude Taxonomy

[Resolved] [Plugin: Cat Tag Filter] Exclude Taxonomy

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

    @ajayver

    Thanks!
    You can open the cat-tag-filter.php file and find line
    $tags = get_tags();
    And change it to
    $tags = get_tags('exclude=2,45,101');
    where 2,45,101 are tag IDs that you want to exclude.

    daniella_mayumi@hotmail.com
    Member

    @daniella_mayumihotmailcom

    Thank you so much!

    squizeers
    Member

    @squizeers

    Is it possible to have sub categories instead of tags of the categories selected? Or if there is any plugin that does it.

    Plugin Author ajayver
    Member

    @ajayver

    Try this code <?php wp_dropdown_categories(“child_of=$cat”); ?>

    squizeers
    Member

    @squizeers

    Thanks for the quick response. Will try it and let you know.

    flavioluizmelo
    Member

    @flavioluizmelo

    Hi, Ajayver!!! Greetings from Brazil. Tell me buddy if its possible extend the query for more than one tag, example:

    Cat 1 Laptops
    + tag Dell
    + tag 15,1 inch screen

    Best regards, Flavio

    Plugin Author ajayver
    Member

    @ajayver

    That is easy and was planned, but I can’t find a way, how to include this feature without ruining usability. Any Ideas on how to design it?

    Hi ajayver

    Many congratulations to your plugin! We’re planning to use it on our site. As we’d really need to be able to choose more than just one tag, I’d be really grateful if you could send me the code.

    Additionally, I have an idea on how to design it. It would be perfect if you could choose which tags you show on dropdown 1 and which tags you show on dropdown 2.

    So to take the example of flavioluizmelo:
    Cat 1 Laptops
    + tag Dell, Lenovo, Apple
    + tag 15”, 17”, 20”

    It’s a bit of configuration for the user, but I think this would be very helpful.

    Best regards

    juelu

    Greating ajayver from Greece

    Thank you for a plugin.

    I have one question it is possible to have other one slide down box for tags to get more better filter ?

    Like this -))
    Category + Tags (include=1,2,3,4) + one more tags (include=5,6,7,8)

    B/ Regards

    Here is a design idea, i would like your plugin too.
    This site in an online store but I see no reason we could not do this in wordpress.
    http://www.youtube.com/watch?v=1-u26ureCf8

    Plugin Author ajayver
    Member

    @ajayver

    It is currently almost same – dropdown for categories and checkboxes or dropdown for tags.
    We can’t do exactly same with wordpress without changing the query. My plugin doesn’t touch the query it only generates the proper link – standard wordpress does the rest.

    squizeers
    Member

    @squizeers

    FOR CATEGORY AND SUB CATEGORY FILTER I DID FOLLOWING

    <?php
    wp_dropdown_categories('selected=-1
    &hierarchical=1
    &depth=1
    &hide_empty=0
    &exclude=1,4,6,11,12,149,150,151
    &show_option_none=Select Category
    &name=main_cat');
    ?>
    
    <select  name="sub_cat" id="sub_cat" disabled="disabled">
    </select>
    
    <script type="text/javascript">
        var dropdown = document.getElementById("sub_cat");
        function onCatChange() {
    		if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
    			location.href = "<?php echo get_option('home');
    ?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
    		}
        }
        dropdown.onchange = onCatChange;
    </script>
Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] [Plugin: Cat Tag Filter] Exclude Taxonomy’ is closed to new replies.