Event Categories Drop-down Hierarchy Unclear

Home Forums Calendar Products Filter Bar Event Categories Drop-down Hierarchy Unclear

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1129624
    Joelle
    Participant

    Hello! My client pointed out that the drop-down menu on the event categories does not really make clear that there are child categories to the main parent.

    I checked under the hood and see that instead of assigning a class to child categories or nesting them as an unordered list, it sticks ”  ” in the span so it move it ever-so-slightly indented — but not enough to tell it’s a sub-category.

    <li class=”tribe-events-category-skill-level”><label><input type=”checkbox” value=”898″ name=”tribe_eventcategory[]” data-slug=”skill-level”><span title=”Skill Level”>Skill Level (Parent Category)</span></label>
    <li class=”tribe-events-category-all-levels”><label><input type=”checkbox” value=”892″ name=”tribe_eventcategory[]” data-slug=”all-levels”><span title=”  All Levels”>  All Levels</span></label>

    With respect, this seems like a weird way to do this. If children had a class on them or were nested, I could apply some tiny bit of CSS and resolve her concern, but I’ve been searching forever and can’t find where this is done. So maybe you can help point me in the right direction? 🙂

    Thank you!

    • This topic was modified 7 years, 11 months ago by Joelle.
    #1129666
    Brook
    Participant

    Howdy Joelle,

    It’s nice to see you around these parts again.

    With respect, this seems like a weird way to do this. If children had a class on them or were nested, I could apply some tiny bit of CSS and resolve her concern, but I’ve been searching forever and can’t find where this is done. So maybe you can help point me in the right direction? ?

    That’s a very kind way of putting it. Our solution there was certainly simply but it lacks elegance and usefulness. ‘

    I just wrote a snippet that adds some CSS classes to those subcats. Paste the following snippet at the top of your theme’s functions.php file. Replace the opening “<?php” with this snippet, as this snippet includes that opening tag.

    https://gist.github.com/elimn/99bf67696bb3e1be85d9c4b0300314c5

    It will add a new filter available in WP-Admin > Events > Settings > Filters. You might want to enable it and disable the original. Now you will notice each item has a class like “tribe-events-subcategory-depth-1” indicating that it is a child of any depth-0 (main categories). If it is two children deep it will be depth-2, etc.

    Does that do what you wanted?

    Cheers!

    – Brook

    #1135560
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Event Categories Drop-down Hierarchy Unclear’ is closed to new replies.