# Setting up Wordpress category dropdown menu

**URL:** <https://forum.pinegrow.com/t/setting-up-wordpress-category-dropdown-menu/156>\
**Category:** WordPress\
**Created:** [September 5, 2016, 12:29am UTC](https://forum.pinegrow.com/t/setting-up-wordpress-category-dropdown-menu/156 "2016-09-05T00:29:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Regi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/regi/32/74_2.png) [@Regi](https://forum.pinegrow.com/u/Regi)\
**Post date:** [September 5, 2016, 12:29am UTC](https://forum.pinegrow.com/t/setting-up-wordpress-category-dropdown-menu/156/1 "2016-09-05T00:29:32Z")

</div>

So I’m starting a Wordpress blog theme from scratch using Wordpress blocks. I have a good understanding of the basic WP framework and how Pinegrow adds WP functions to common page elements, but I’m having some trouble wrapping my head around how the category dropdown menu works. I figured there would be a list item loop (like for blog posts) to add for the first drop down item and it would propagate all category items inside the menu but there is no such function. I’m left with a dropdown menu that looks something like this:

```
<div class="dropdown" wp-dropdown-categories wp-dropdown-categories-orderby="NAME" wp-dropdown-categories-order="DESC"> 
                        <a data-toggle="dropdown" href="#">Dropdown trigger</a> 
                        <ul class="dropdown-menu" role="menu"> 
                            <li>
                                <a href="#">Action</a>
                            </li>                                 
                            <li>
                                <a href="#">Another action</a>
                            </li>                                 
                            <li>
                                <a href="#">Something else here</a>
                            </li>
                            <li class="divider"></li>                                 
                            <li>
                                <a href="#">Separated link</a>
                            </li>
                        </ul>                             
                    </div>

```

I realize that the function replaces the whole element, but I think I need some clarification as to how the menu will appear and which element I can apply styles to.

---

<div class="post-metadata">

**Author:** ![itsmeleo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/itsmeleo/32/19_2.png) [@itsmeleo](https://forum.pinegrow.com/u/itsmeleo)\
**Post date:** [September 5, 2016, 12:30pm UTC](https://forum.pinegrow.com/t/setting-up-wordpress-category-dropdown-menu/156/2 "2016-09-05T12:30:30Z")

</div>

@Regi do you know about wp\_list\_categories and how to show categories in List View as well as in Dropdown ?

---

<div class="post-metadata">

**Author:** ![Regi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/regi/32/74_2.png) [@Regi](https://forum.pinegrow.com/u/Regi)\
**Post date:** [September 5, 2016, 1:21pm UTC](https://forum.pinegrow.com/t/setting-up-wordpress-category-dropdown-menu/156/3 "2016-09-05T13:21:34Z")

</div>

Should I attach wp-list-categories to the `<ul>` tag?

---

<div class="post-metadata">

**Author:** ![greyguru](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/greyguru/32/33_2.png) [@greyguru](https://forum.pinegrow.com/u/greyguru)\
**Post date:** [September 5, 2016, 7:59pm UTC](https://forum.pinegrow.com/t/setting-up-wordpress-category-dropdown-menu/156/4 "2016-09-05T19:59:21Z")

</div>

I think I may have misunderstood your context when I replied earlier, so I’ve deleted that part in this reply and will leave you with this:

What I’d do is put it in, run the change in Chrome (or your favourite) and use developer tools to see what is generated and therefore what element you need to add to the CSS to. Hope that helps!

---

<div class="post-metadata">

**Author:** ![Rob](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/rob/32/9_2.png) [@Rob](https://forum.pinegrow.com/u/Rob)\
**Post date:** [September 5, 2016, 9:34pm UTC](https://forum.pinegrow.com/t/setting-up-wordpress-category-dropdown-menu/156/5 "2016-09-05T21:34:18Z")

</div>

@Regi what about this [https://codex.wordpress.org/Function\_Reference/wp\_dropdown\_categories](https://codex.wordpress.org/Function_Reference/wp_dropdown_categories) or is using the built in Categories option in Menus and option [https://wptavern.com/how-to-create-a-dropdown-menu-of-wordpress-categories-without-using-code](https://wptavern.com/how-to-create-a-dropdown-menu-of-wordpress-categories-without-using-code)
