[wp-hackers] Changing page permalink structure

Benjamin Lupu benjamin.lupu at gmail.com
Sun Sep 23 20:11:09 UTC 2012

Thank you Bryan. I agree with you. Just to let you know that my developper
and I have checked the core's code and we've found that there is no hook to
manipulate page permalinks in it. I believe this is why there is no plugin
with such functionality (to my knowledge). Before an option, I would like
to have those hooks. With them, I will be fine with the current default

Does anybody find one this hook in the current core's code ? (Just checking
if we're wrong.)

Date: Fri, 21 Sep 2012 09:35:07 -0600
> From: Bryan Petty <bryan at ibaku.net>
> Subject: Re: [wp-hackers] Changing page permalink structure
> To: wp-hackers at lists.automattic.com
> Message-ID:
>         <CAKB8V+p1wTTHCDwpDL=sOy8oCP6hajD=
> q5a0PMBr1s8Jpkqnjw at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 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

Benjamin Lupu
Email: benjamin.lupu at gmail.com

More information about the wp-hackers mailing list