Child pages in Wordpress
Hello everybody, today I thought I would do a blog about pages in Wordpress and in particular how to add child pages in Wordpress so they display as a drop down menu on your site in the menu itself
This can be useful if you want to create many pages on the same topic on your site, that are related to each other, as I talked about in my first blog post, Wordpress is a content management system (CMS), so understanding the engine that does the content management is vital to mastering Wordpress, I think
The main difference between pages and posts is that pages can be organised, by what is known as a hierarchy and posts usually go in categories
So first of all I will go through the steps needed to create a page hierarchy
I have an affiliate site already and so I will use this site as the example to explain how to set up page hierarchy and I will leave a link to the site, so if you wish to see this in real life you can go take a look at my affiliate site its called www.candycrush109.org
On this site I have a menu item called -free on-line games to play- where I have embedded some free on-line games, for my visitors to play while they are on my site and so I have created a page hierarchy for all the list of games available
So the first step is to create the main page and publish it as normal , make sure the page is listed in your menu
Once you have done this you can then create a child page for the parent page, so the first page will be the parent page and the subsequent other pages will be the child pages and this will also create a drop down menu on you site
So here is how you create the child pages
Create the child page as normal but before you publish it select the page you want to be as parent page in the page attributes box as per the picture below
As you can see the parent page has been selected and the child page in this case is called 9 ball pool which is the name of the game on the page
Once you have published the child page go to the menu and add the child page to the menu and now you have to drag and drop the child page which will be directly under the parent page slightly to the right and then you will see the tab change to - sub item
Which you can now see in the picture below
Now all you have to do, is save the changes in your menu and when you go to your site and hover your mouse over the menu item a drop down menu will appear, listing all the sub items for that menu item
So to recap- the top page is the parent and when I published this page and Ieft the page attributes blank
Then I published a new page and before I published it I selected the parent page for the child page as is in the picture above
I then went to menu and dragged and dropped the child page slightly to the right to create a sub item
hen save changes in the menu
Parent page = free online games to play
Child page = free online games to play - 9 ball pool
That's it all done
Hope you have enjoyed this little Wordpress tip
To all your success
Barry
Recent Comments
11
Hi Everybody who wants to create a dropdown menu with just a heading.
There is a lesson for this by one of the WA members and it is so very eezy peezy Custom Dropdown Menu Trick Have nice day everyone.
Robert
I have the parent/child thing already but two questions. 1) Can you do an internal link directly to the child page. Each time I try it goes to the parent. 2) Can you make that parent a separate colour from the other menu titles to show something is different (in this case there is a drop down page/s)?
Hi Helen. This link for you as well. Custom Dropdown Menu Trick Have an excellent day.
Robert
Yes. In the menu area delete the link url and replace it with #. That will stop the page from opening.
Thanks for another great article. If you don't want to put content on the parent page, is there a way to disable it so nothing will happen when you click on the tab other than the list of nested articles showing up?
See more comments
This was awesome, but I couldn't open your link. I just used your directions and it worked perfectly! Thank you!