• Hi all,

    Does WordPress’ menu by default inherit the parent-child relationship of its site’s pages? For example, I add a bunch of pages, some of which are top-level and some are children of the top-level items. Then, when I create a new menu and add all pages, it adds them all as top-level pages, regardless of the fact that they aren’t all top-level, and as far I can tell I have to manually re-position the menu items inside the menu-structure pane in order to adhere to the sitemap I had originally intended.

    This begs the following questions:
    i) Is this normal WordPress behavior and is there a work around; am I doing something wrong and I’m causing this behavior or; is this just the way it is (things will never be the same)?
    ii) If it is normal behavior, does this mean that I have to manually alter the menu structure independently every time I create, update or delete a page?

    NB I’m creating a custom theme and it’s my first WordPress site and despite carrying out lots of searches for this problem and reading the documentation I haven’t been able to find a satisfactory answer.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • I have had the same question for a couple of weeks after beginning to work on a new theme, and I have just experimented (after reading what you have said) and got the desired result by manually re-positioning menu items inside the menu-structure pane. I never had to (and actually could not) select any menu at all with my previous theme to get the desired result. So yes, it seems what you described is default behaviour just like having to position widgets.

    Edit: Many thanks for showing me how to solve the menu-customization riddle!

    Thread Starter brendan_balwebco

    (@brendan_balwebco)

    It can’t be the case that such a comprehensive CMS would omit such a simple feature surely? It doesn’t make sense that you should have to maintain two lots of parent-child relationships between pages, that’s madness. There must be a way around this.

    I agree even though I can see the benefit of the flexibility. It would seem there should be a button (or line of code in a Child Theme?) for auto-arranging the parent-child menu as first established at the page editor.

    Oops.

    Oops again. My browser had fooled me into believing no post had been made.

    Thread Starter brendan_balwebco

    (@brendan_balwebco)

    I would have assumed that the functionality would be such that when one defines a sitemap, akin to the UI in the menu pane, each menu item then has its own attributes including those that define whether or not it is included in the navigation.

    I don’t see the benefit of having two separate methods for controlling page positions within the sitemap hierarchy e.g. changing the parent of a particular page in the ‘edit page’ pane to then have to repeat the action in the ‘edit menus’ pane in order to keep the sitemap and navigation consistent; why would you want the option of having the navigation different to your sitemap? If it’s simply to control whether or not certain pages are included in the navigation then why not just have the menu adhere to the sitemap but have an extra attribute for each page, in addition to the ‘page parent’ attribute, that says ‘included/excluded from navigation’, rather than having to create an entire custom navigation?

    Hopefully I’ve completely missed the point.

    Any WP experts?

    Thread Starter brendan_balwebco

    (@brendan_balwebco)

    …This of course means that when creating a new site and all its pages you then have to setup a menu and re-do the parent-child relationships as when you add all the pages in the menu pane it inserts them all as top level items by default.

    when you add all the pages in the menu pane it inserts them all as top level items by default.

    I have just done a test with a new Twenty Twelve Child Theme (no customizations) to investigate this further, and the parent-child relationships *are* recognized just as we agree they should be. So then, it would now seem WordPress does not presume the matter either way while offering Dashboard options for menu arrangements as well as for themes to take care of that.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress menu structure not inheriting page relationships’ is closed to new replies.