[Resolved] Remove parent slug in URL

Home Forums Support [Resolved] Remove parent slug in URL

Home Forums Support Remove parent slug in URL

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #232007
    Nadia

    Hi

    I am trying to reduce the overall lenghth of the URLs whilst using parent/child page structure.

    I could not find any code to do this. Do you have any advice for a tested solution, without a plugin?
    Thanks
    Nadia

    #232097
    Tom
    Lead Developer
    Lead Developer

    Hi Nadia,

    You can just not set a page as a child of another page.

    If the reason you’re doing that is to create a dropdown menu, you can create them in “Appearance > Menus” without the parent/child relationship: https://generatepress.com/knowledgebase/using-menus/

    #232123
    Nadia

    Hi Tom

    No the reason I am doing this is because I use the plugin Dyanic Widget. It is much easier to set up widgets when there is a parent/child relationship. I can just set it up so that it shows on every page that has a certain parent and just forget about it. Otherwise I need to go page by page.

    Is there no way at all? I am sure there is a way to do this to remove the catergory from the permalink as I have used this in the past. But never tried for the parent/child pages.

    Thanks again
    Nadia

    #232130
    Tom
    Lead Developer
    Lead Developer

    After a quick search, this plugin might offer a solution: https://wordpress.org/plugins/custom-permalinks/

    If you Google “wordpress remove parent page from slug url”, you’ll find a lot of functions which might be worth trying as well.

    #232141
    Nadia

    Hi Tom

    Yes I have tried those functions (some anyway) but they did not work. I was wondering if there was something with GeneratePress.

    But thanks for looking it up for me!
    Nadia

    #232154
    Tom
    Lead Developer
    Lead Developer

    No problem, I hope you find a good solution 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.