admin管理员组

文章数量:1122832

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/membership (instead of www.coolclub/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?

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 edited Jun 15, 2020 at 8:21 CommunityBot 1 asked Feb 13, 2013 at 4:53 WilliamWilliam 5452 gold badges8 silver badges18 bronze badges 3
  • Does the permalink not update after you click the Save Draft or Publish button? – Milo Commented Feb 13, 2013 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 Commented Feb 14, 2013 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 Commented Feb 14, 2013 at 4:44
Add a comment  | 

1 Answer 1

Reset to default 0

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.

本文标签: Permalinks of New Pages and their Parents