[wp-hackers] Changing page permalink structure
Bryan Petty
bryan at ibaku.net
Fri Sep 21 15:35:07 UTC 2012
On Fri, Sep 21, 2012 at 3:03 AM, Benjamin Lupu <benjamin.lupu at gmail.com> wrote:
> - By default page permalinks reproduce the breadcrumb to the page :
> http://[domain]/[top
> page slug]/[subpage 1 slug]/[subpage 2 slug]/[final subpage slug]
> - This structure is fine. However, sometimes I move pages or slightly
> modify the page tree
> - It causes permalinks to change as page/subpages dependencies have changed
> too
This is interesting because while pages have the "permalinks" feature,
and it would normally work as designed without any problems, it is
partially broken with the decision to use parent page slugs in the URL
for this reason.
There might be a plugin that disables parent page slugs in the URL,
though I haven't seen one that does it yet. In your case (having pages
already published under those URLs), any plugin that does this though
would break all your existing pages though, so you will likely just
have to deal with this.
This can quickly turn into a rather lengthy discussion debating which
behavior should be the default, and there's certainly good reasons for
both sides. On one side, it could be argued that permalinks are broken
(i.e. this is a bug) with parent page slugs being used. On the other
hand, many sites need that extra context for tons of pages that really
helps with SEO (when pages aren't moved). You could also argue that
the extra context can *still* be used without parent page slugs by
just adding it to your page slugs by hand.
What I think would be an awesome compromise would be to disable parent
page slugs, but re-adjust the page slug generator for new pages to
prefix the new page slug with the slugs of parent pages at the time
the page is created or published.
Regards,
Bryan Petty
More information about the wp-hackers
mailing list