Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    As long as the page slug is correct, WP does not require the parent page slug, it will find the right page anyway. It will then redirect automatically to the proper hierarchical permalink. Thus the older URLs using the same slug without parent will work just fine.

    The problem with such a scheme is the automatic redirect returns a 302 temporary redirect status. But for SEO reasons, you really want a 301 permanent redirect. If it’s not too onerous, it’s better to do 301 redirects in .htaccess.

    Thread Starter cmaner56

    (@cmaner56)

    Thank you for your response. I really appreciate it.

    In WP Admin would I go to Settings > Permalinks then select Custom sStructure and add /%postname%/ in the field to have permalinks that do not contain the parent?

    Thread Starter cmaner56

    (@cmaner56)

    Well – setting a custom structure as I described above does not work. Using %postname% is the same as the one bbefore this option in the permalink settings. It is still showing the parent folder name and I need it to just have the //root_url/post or page name.

    Any suggestions on how to achieve this?

    Moderator bcworkz

    (@bcworkz)

    What is it you are really trying to achieve? Beyond the URL composition I mean. Just get old site links to work with your new WP site? Or is there really some functional problem beyond the old site URLs where the parent page in the URL is just not tolerable? And if that’s the case, why use parent pages then?

    My goal is to achieve what you want in the least complicated, most efficient way possible. I’m not sure what you really want. TBH, I’m not sure you truly know either ?? It is possible to not have parent page slugs in URLs. I’ll need to do some research to figure out how, it’s not as simple as doing the right permalink settings. But if your goal is to merely ensure old links still work, this is not the best way to achieve that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Permalink Format’ is closed to new replies.