• Resolved bizarrerie

    (@bizarrerie)


    I am sure this is simple, but I am having trouble.

    My goal is to have the categories in a navigation bar at the top. When the user hovers over the category, I would like for the children categories to appear beneath.

    So far, I have only found solutions to have the categories in a dropdown, not the method I am looking for.

    Any help?

    I just need the PHP snippet.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi bizarrerie,

    You should be able to achieve this using the [wp_list_cats();] template tag and then using CSS.

    Good example of CSS for this would be [https://htmldog.com/articles/suckerfish/dropdowns/].

    Regards
    Pete

    Thread Starter bizarrerie

    (@bizarrerie)

    Thanks for the reply peter. I have exhausted most of the codex pages trying to answer this question.

    I need the children to be nestled inside the ul of the category lists.

    Something similar to this:

    <ul><li>Category
    <ul class="children-cat"><li>Child Category</li>
    <li>Child Category</li>
    <li>Child Category</li></ul>
    </li></ul>

    I know the CSS to hide it, my problem is that I cannot generate this using wp_list_cats. More specific help would be appreciated!

    Thread Starter bizarrerie

    (@bizarrerie)

    got it! Super stupid ~_~

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Generating category and children dropdowns’ is closed to new replies.