0

Today I use:

permalink_structure: /%postname%

This gives me URL like this on my pages:

  1. #http://www.mypage.com/page1
  2. #http://www.mypage.com/page1/page2
  3. #http://www.mypage.com/page1/page2/page3

But I want it to be:

  1. #http://www.mypage.com/page1
  2. #http://www.mypage.com/page2
  3. #http://www.mypage.com/page3

How can I make this happen?

I still want to use the parent function in wordpress admin...

The reasons why I want this are:

  • It looks so much better
  • When I (or some one else) change URL of page1 I am not messing up the URL for page 2 and page3 (less 301 work)
  • (Better SEO)
0

One solution would be to create all your pages as root pages and then use the Menu page in "Appearance -> Menus" to define the structure of the pages. This assumes that your theme supports Menus, which the default Wordpress themes TwentTen and TwentyEleven do.

Update:

Here's a couple of links that might help you do this without using the menus functionality (as I fully agree with your comment that it's a little annoying to use the menus functionality).

This is a plugin which seems like it might help:

http://wordpress.org/extend/plugins/custom-permalinks/

And here's an example of hacking the Wordpress core code (which I would generally not recommend):

http://wordpress.org/support/topic/page-permalinks-without-hierarchy-parents

I haven't tried either though.

3
  • That's the best plan B :) A litle anoying for all sidebar menues for subpages tough.
    – hakan
    Nov 28 '11 at 12:51
  • I've updated my answer with a couple of links that might help you avoid the menu functionality.
    – ZweiBlumen
    Nov 28 '11 at 13:30
  • Thanks ZweiBlumen, actually I figure thath I will go with the "Menu page". In ONE menu I will structure the hole page structure. Then i will use RAW MySQL and PHP to make it function like this: Head menu = Level 1 (+ Level 2). Sidebar menu = Level 2 + 3 for current level 1 page. Will post it when I figure out how to do this :)
    – hakan
    Nov 28 '11 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.