WordPress.org

Ready to get started?Download WordPress

Forums

Query Multiple Taxonomies
folding sub-taxonomies possible? (5 posts)

  1. johnklijnen
    Member
    Posted 3 years ago #

    Is it possible to make the taxonomy-drilldown-lists fold open to show sub-taxonomies? I want to hide them if the parent taxonomy is not yet selected. I have tried:

    .taxonomy-drilldown-lists  ul ul,
    .taxonomy-drilldown-lists .children ul ul,
    .taxonomy-drilldown-lists .current-term ul ul,
    .taxonomy-drilldown-lists .current-term .children ul ul,
    .taxonomy-drilldown-lists .current-term .current-term ul ul {
    	display: none;
    	}
    
    .taxonomy-drilldown-lists .children ul,
    .taxonomy-drilldown-lists .current-term ul,
    .taxonomy-drilldown-lists .current-term .children ul,
    .taxonomy-drilldown-lists .current-term .current-term ul,
    .taxonomy-drilldown-lists .current-term .current-term .children ul,
    .taxonomy-drilldown-lists .current-term .current-term .current-term ul {
    	display: block;
    	margin-left:20px;
    }

    But it's not working. I think .current-term doesn't do the trick. I'm lost in css code all together after trying for 5 hours :-)
    Maybe it's not possible or I have to do it in PHP.
    Anyone???
    Thanks in advance, greets John.

  2. johnklijnen
    Member
    Posted 3 years ago #

    Let me try again.

    Is there any way of making the sub-taxonomies disappear (in the drilldown lists) if the main taxonomy hasn't been selected? I want to keep the list as short as possible.

  3. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    I think you mean child terms (there is no such thing as a sub-taxonomy).

    It's definetly possible, just not sure if you can do it using only CSS.

    I might add it as an option in the next version of the plugin. Don't know when I'll have time for that, though.

  4. johnklijnen
    Member
    Posted 3 years ago #

    Thanks Scribu,

    I hope that you add it as an option in the next version of the plugin!
    In the meantime I solved the problem in css although not exactly what I want:

    .taxonomy-drilldown-lists .term-item .children{
    	display:none;
    }
    
    .taxonomy-drilldown-lists .term-item:hover .children{
    	float:left;
    	display:block;
    	padding:0 0 0 5px;
    }
  5. anmari
    Member
    Posted 3 years ago #

    Or

    #term-list-plugin_categories ul li .children {
    display: none;
    }
    #term-list-plugin_categories ul li:hover .children {
    display: inherit;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic