Remove parent page from permalink URL?
-
Right now I have a page structure that looks like this:
Main
– About
– ContactThat means the permalink URL for the About page looks like this: http://domain.com/main/about/
Is there a way to remove “main” from the URL so it looks like: http://domain.com/about/?
And no, I can’t remove “Main” as a parent unless someone has a better solution to the following problem:
All the pages under “Main” are part of the main navigation of my theme. I did this so that I can display the main navigation using ONE page id instead of excluding every single page I create now and in the future.
For example:
/* page_id = 10 is for “Main” */
wp_list_pages(‘child_of=10&sort_column=menu_order&depth=1&title_li=’);instead of
/* so every time i add a page that’s not part of the main navigation, i’d have to update this line of code */
wp_list_pages(‘exclude=10,11,12,13,14,15&sort_column=menu_order&depth=1&title_li=’);Anybody have any thoughts?
Thanks,
-Alex
The topic ‘Remove parent page from permalink URL?’ is closed to new replies.