How to Create Dropdown Menus with WordPress Pages
No matter what CMS we’re teaching, when we come to talking about themes and designs, one question always comes up quickly: “How do I make a dropdown menu”?
This tutorial provides one answer to that question in WordPress.
Option 1: Creating Dropdown Menus With Pages
We’ll start by creating a menu in the 2011 theme. When you first install WordPress it has a page called “Sample page”. When you view the site, you’ll see that it is one of the two menu links: Home and Sample Page. We’re going to add a third menu item.
- Go to your admin dashboard.
- Click Page > Add New.
- Add a title and some content.
- Take a close look at the Page Attributes section.
- Under Parent, set it to (no parent).
- Publish your page.
- Check your work on the site.
Now let’s add a dropdown link. The process is identical except this time when we choose the parent, choose Sample Page.
I’ll create some additonal pages and show you the result.
Mousing over the Sample Page shows the three pages I added on the second level of the menu. To create more levels, you repeat the process, choosing the proper parent each time.
I created three levels of pages. Each time you create a new page, just be sure you have it on the proper level by choosing the proper parent.
Here is what the fully expanded, three level menu looks like:
Great, thanks for that. Any idea if you can make the top menu item (i.e. the parent) not clickable…?
put # in the url
i do the same thing but when i kept mouse on the menu the dropdowns are not appearing
Thanks very much for this, but I share JamesB’s question: is there any way to make the parent page not clickable?
I also share raaja’s comment. When I kept Mouse on the menu the dropdown are not working
Hi, first of all let me thank you for the amazing post. But I have a question.I want the sub menu to be dyanamic.suppose ‘Do It Youself Beauty’ is a menu. The submenu would be ‘Hair’,’Nail’, ‘Skin’ etc. Now I would like to make new posts in each sub menu which will change displaying the latest post rather than a static page. It would be great fi you could help me here. Also I do not see the ‘Parent’ option when I publish ‘Posts’, I see ‘Category’ rather. What is the difference.
this is nice tutorial, but what if the theme doesn’t support dropdown menu. hope you can make a tutorial on making the theme function as the dashboard been configured to have a menu and sub-menu. Thanks for sharing!
not using default theme then how to make dropdown above solution not worked
Its again a nice blog in the list of all those [url=http://ostraining.com]ostraining.com[/url] has posted yet. thanks a lot
Thank you! This is what I was looking for. Works great.
Thanks a lot I really do appreciate
This is so helpful, you made it easy to follow. It worked just as you said.
I have 15 products in my product category in the drop-down menu. but only 9 can be seen and i am not able to scroll down in the drop-down menu to see the other listings.