How to Create Dropdown Menus with WordPress Pages

tutuploadsmedia_1337712219388.png

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.

It’s important to know one thing before you begin:
 
You can only easily use dropdown menus with themes that support them. Fortuantely, most themes now include a dropdown menu feature. The default 2010, 2011 and other basic themes include this feature. Older themes may not.

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.

tutuploadsmedia_1337712219388.png
  • Under Parent, set it to (no parent).
  • Publish your page.
  • Check your work on the site.

tutuploadsmedia_1337712352340.png
By adding a new page at the top level (no parent) you automatically create a new menu item. The menu items appear in alphabetical order. To change the order go back to the Page Attributes and changer Order from 0 to 1.

tutuploadsmedia_1337712491356.png
You’ve reordered the menu. The items will appear alphabetically unless you manually change the order. The lowest number is 0, not one. If all the menu items are set to Order=0 then the default is to show them alphabetically.

tutuploadsmedia_1337712668774.png

Now let’s add a dropdown link. The process is identical except this time when we choose the parent, choose Sample Page.

tutuploadsmedia_1337712966111.png

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.

tutuploadsmedia_1337713010840.png

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.

tutuploadsmedia_1337713168291.png

Here is what the fully expanded, three level menu looks like:

tutuploadsmedia_1337713294185.png

 

Author

0 0 votes
Article Rating
Subscribe
Notify of
guest

13 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
JamesB
JamesB
12 years ago

Great, thanks for that. Any idea if you can make the top menu item (i.e. the parent) not clickable…?

OpenGL Projects
OpenGL Projects
7 years ago
Reply to  JamesB

put # in the url

raaja
raaja
11 years ago

i do the same thing but when i kept mouse on the menu the dropdowns are not appearing

OwainB
OwainB
11 years ago

Thanks very much for this, but I share JamesB’s question: is there any way to make the parent page not clickable?

Abida
Abida
11 years ago

I also share raaja’s comment. When I kept Mouse on the menu the dropdown are not working

setu
setu
11 years ago

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.

y3 world
y3 world
11 years ago

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!

Ashish Singh
Ashish Singh
10 years ago

not using default theme then how to make dropdown above solution not worked

Rouger fillip
Rouger fillip
9 years ago

Its again a nice blog in the list of all those [url=http://ostraining.com]ostraining.com[/url] has posted yet. thanks a lot

Ilene
Ilene
7 years ago

Thank you! This is what I was looking for. Works great.

gboyega
gboyega
6 years ago

Thanks a lot I really do appreciate

Beth A
Beth A
5 years ago

This is so helpful, you made it easy to follow. It worked just as you said. 

makhmoor choudhary
makhmoor choudhary
4 years ago

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.

13
0
Would love your thoughts, please comment.x
()
x