Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am running into a new issue where when I attempt to create a new page, the permalink is not being auto generated.

For instance

On the 'Add New Page' page, I select 'Our Club' as the parent (which has a slug of 'club'). I then type in 'Membership' as the title. However, the permalink that is generated below the text input says www.coolclub.com/membership (instead of www.coolclub.com/club/membership as expected).

If, instead of select 'Clubhouse' as the parent of my new page (which is itself already linked as a child page of 'Our Club'), then the permalink is generated successfully.

Any ideas?

share|improve this question
    
Does the permalink not update after you click the Save Draft or Publish button? –  Milo Feb 13 '13 at 5:14
    
No it doesn't - I have found though that after I create the page and update, if i come back and then move it to a new parent, the permalink is updated correctly. But I still would like to make it work when I initially create the page - if there is a problem in my site I would rather fix it now as opposed to it causing some issues further down the line - –  William Feb 14 '13 at 4:27
    
very strange. I suggest you try disabling plugins and switching to one of the default themes to see if it's possibly theme/plugin related. if the issue disappears, re-enable things one at a time until you narrow down the cause. –  Milo Feb 14 '13 at 4:44

1 Answer 1

NOTE: The information below is somewhat inaccurate. My mistake. The Page hierarchy is shown in permalinks, and the article I linked to discusses changing it in Posts. Thanks for the correction, @Milo.

Original Post:

You may not like this answer, but WordPress doesn't include page hierarchy in urls. It is for use in your theme (menus, breadcrumbs...) only. So the behavior you are seeing is correct.

I did find an article discussing a way for you to impose that structure on a per-page basis. WordPress won't do it dynamically for you, but it can be done.

http://winkpress.com/essential/permalinks/

The plugin mentioned in that article can be found here:

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

Sorry that there doesn't seem to be a way to make it happen automatically. If you are savvy, you might be able to write a little something that talks to that plugin, but I really don't know if that is possible.

share|improve this answer
    
Sorry, this is incorrect. WordPress includes the hierarchy in the URL for the page post type. The site you linked describes creating hierarchy for the post post type. –  Milo Feb 13 '13 at 15:43
    
Yea - so where is this behavior prescribed? Is it written in PHP somewhere or is it in the .htaccess file? I am a bit new to PHP/web programming (I'm a C# guy). –  William Feb 14 '13 at 4:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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