Support » Fixing WordPress » What determines child page directory structure?

  • Resolved marcusjkw



    I have two drop down menus on my website, one from the ‘home’ link, and one from the ‘services’ link.

    Child pages under the ‘services’ drop down menu have a nice neat web address,
    i.e. http:// (website name)/services/(page name)


    When I added child pages under the ‘home’ drop down menu, they seem to have come up with the random directory structure / address,
    i.e. http:// (website name)/joinery-2/(page name)


    I’d really like to be able to change this so the child page has the parent in the address
    http:// (website name)/home/(page name)

    The website in question is at

    Thanks if anyone can offer any insight.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Just looking at another site,, I can see that their child pages from the ‘portfolio’ drop-down menu do not show the parent in the web address.

    Where can these settings be altered?

    It’s not random, but you’ve got some weird configuration going on there, it may be something in your theme settings. I noticed that trying to load the page redirects to the home page instead.

    Two screenshots would be useful here to see what you’ve got going on hierarchy-wise. One from each of these two links would tell us more:

    Thanks for your interest and support 🙂

    Hopefully these links will work.

    I took 2 screen shots so you could see below the fold

    edit.php?post_type=page part 1
    edit.php?post_type=page part 2

    nav-menus.php part 1
    nav-menus.php part 2

    Yay, working.

    I’ve not been able to find any reference to “joinery-2” anywhere

    Nor do I recall there ever being :-s


    I just got access to the other website I mentioned, and looked at their page structure. They have not made any page a child of another, and have simply created the drop down menus in the ‘menu’ settings.

    I’m not quite ready to change this issue to resolved, because, where did the term “joinery-2” come from?

    Hmm, I don’t see anything strange at all in either of those screenshots and your organizational stuff looks fine. I noticed that in your menus screenshot, your submenus are not setup there, but on the front of the site, they are (though I suspect that the theme probably adds the child pages automatically).

    A little bit about the “-2” addendum. WP automatically adds a -2 to the slug of anything that already uses that slug. It is most commonly seen in tags and categories, but also effects pages and posts too. For example, say you create a category called kitchens. A few months later, you attempt to create a tag, also called kitchens. The tag will be created, but because the slug was previously used by the category, the slug for the tag will become kitchens-2.

    I suspect that at some point, you created a second joinery page and the -2 was added to the slug, but then you changed the title of that page without making the change to the page’s slug.

    Here is where you will find the problem…

    The page you did this to was your Home page. Without seeing it, I can guess based on two behaviors: 1) Attempting to load redirects to the homepage – because you have that set as your home page. 2) The URL for the child pages includes joinery-2 and they are setup as the child pages to your Home page. Parent page slugs are included in the child page URLs. You will find joinery-2 in your dashboard as the slug for the Home page.

    Solution: Update the slug for the Home page to read as home, or something appropriate for that particular menu.

    I just tried to make all the child pages under the ‘services’ page into ‘no parent’ pages,

    followed by making them sub menu items under “services’ in the NAV menu on the ‘Menus’ editing page of wp-admin

    It didn’t work, it made a mess, so i switched everything back.

    I then noticed that I have created another menu called ‘SERVICES’ with the child pages under it.

    I’ve take a screenshot here.

    Is this why I’ve got problems?

    Looks like we posted at the same time. See my post above yours.

    Oh, hi and thanks, I posted my last post here before realising you had responded, so it’s not a response to what you’ve just written. This is tho…

    I find the a lot of the terminology within the wordpress admin a bit confusing or lacking explanation e.g. categories, tags, slugs, etc

    I’m not asking you to explain them for me by the way – for that I just got a copy of WordPress for Dummies so hopefully a lot of answers will be in there.

    Now you mention it, when I first set up the site i think i had joinery, building, maintenance, etc., as main pages until i realised there were too many and decided to use drop down menus

    Thanks for your help, I’ll have a look and see if I can find what you mean.

    BINGO! I found the slug by clicking quick edit on the home page.

    So the ‘slug’ is what appears in the address bar right?

    Thankyou for your help!

    Yes, the slug forms part of the URL, in the address bar and everything in WP gets a slug and when you use duplicate slugs in words or phrases it tends to muddy the waters. Once you understand that, you know then that you have to go in occassionally and check for clean up.

    Glad this worked out for. Good luck with your site!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘What determines child page directory structure?’ is closed to new replies.