Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

why does my wordpress menu parent show an illegitimate child?

One of the pages that is suppose to be a child of the main menu "work" section is showing it's a child of the "blog" section when I view source. Why is it doing that? I want it to be a child of the "work" section.

Here is the wordpress code:

<!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse navbar-ex1-collapse"> <ul class="nav navbar-nav"> <div class="menu-main-menu-container"><ul id="menu-main-menu" class="menu"><li id="menu-item-22" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22"><a href="http://localhost/darcy_bootstrap/">Home</a></li> <li id="menu-item-21" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-21"><a href="http://localhost/darcy_bootstrap/work/">Work</a></li> <li id="menu-item-19" class="menu-item menu-item-type-post_type menu-item-object-page current_page_parent menu-item-19"><a href="http://localhost/darcy_bootstrap/blog/">Blog</a></li> <li id="menu-item-18" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-18"><a href="http://localhost/darcy_bootstrap/about/">About</a></li> <li id="menu-item-20" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20"><a href="http://localhost/darcy_bootstrap/contact/">Contact</a></li> </ul></div> </ul> </div><!-- /.navbar-collapse -->

does your theme support custom menus ?

Yes it does.

1 Answer

jeff creamer
jeff creamer
23,733 Points

Hey Darcy,

inside your WP dashboard, go to Appearance -> Menus, call up your main menu. Drag the child page a little to the right so it's indented under "work" menu item; that should make that page a child menu item of Work.

Also, go to the page you're talking about, open it up to edit it. On the right side of the dashboard, look for the Templates, etc. There is a box you can click to assign a page as a child of another page by selecting which main page is its parent. Make sure its parent is not set to "Blog", but "Work."

Hope that helps.