I now switched to permalinks and defined my own structure
/%postname%. If I click on a menu item it takes the path from the parent page (hierarchy defined directly when editing a page). I want that the permalink uses the structure of the menu. How can this be done?
|
|
||||
| show 1 more comment |
|
THE PERMALINKS The permalink on WordPress is generated by WP_Rewrite class on wp-includes/rewrite.php. It translate the URL being entered on browser into query variables which then being used by WP_Query to determine which content will be loaded. There are rewrite rules which define the structure of permalink. Categories are structured by default as website/category/category_name Pages are structured as website/pagename and for posts: it is website/custom_structure, where custom_structure is what you define on the Setting > Permalink on admin page. Pages, is by default reflecting it parents so third level page will have website/Level1/Level2/Level3 THE NAVIGATION MENU The navigation menu doesn't reflect the permalink, it depends on how user will build the structure of the menu. So, if you need the menu to follow the page structures, create a manu based on them. Having the permalink structure followed your menu takes more effort than you could imagine. Having custom permalink is dealing with some actions. 1. You have to create custom structure for each part of your page which are categories, tags, port_formarts, taxonomies, posts etc. 2. You have create rewrite rule for them as well. 3. You have to make sure that they don't conflict each other. |
|||
|
|
www.example.com/page1/page2a? – Stephen Harris May 1 '12 at 11:38