Use navigation path from menu for permalink

Yes, I could set the menu structure, but I don’t know if the user would make this, when he creates a new page. The difference is here because I needed the hierarchy for some special adaptions I made (read the content from certain sub pages and so on …). Normally, the menu should define the structure of the permalink. That’s the reason why I asked for it. And the menu hierarchy is already available. So one would have to define the hierarchy two times. Perhaps I don’t understand a certain concept.

The “menu” doesn’t define anything in any web application. At least not if the architecture isn’t bogus and assumes that everyone actually got a menu. There’re other navigation ideas as well.

To get data from the siblings of a page, you can use get_page_children() – detailed use case in Codex. That function will work for hierarchical post types as well.

Leave a Comment