WordPress.org

Ready to get started?Download WordPress

Forums

change structure of page permalink (not for posts but for pages) (4 posts)

  1. iansane
    Member
    Posted 2 years ago #

    Hi,

    I have changed my posts permalinks successfully under settings>permalinks but I need to change the permalink of pages to append something before the page slug.

    I need dev.local/about/ to be dev.local/blog/view/about/

    I would like to append this to all page slugs automatically but I can't even add it manually because when I click OK wordpress removes my slashes making it look like this, dev.local/blogviewabout/

    So, two questions: 1. Can I change wordpress somewhere to add this automatically to pages? 2. If not, then how can I make wordpress stop removing the slashes?

    Thanks

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    Create a parent page titled 'view' and then make the rest child pages of it...if this affects a page menu create a custom menu and include just the children.

    You cannot use / in the url string as you want. / means something rather important in the browser/site navigation scheme...

  3. iansane
    Member
    Posted 2 years ago #

    Thank you SwansonPhotos,

    I will see how far I can get with the parent page suggestion.

    You cannot use / in the url string as you want. / means something rather important in the browser/site navigation scheme...

    Well I am integrating codeigniter and this is exactly why I need to be able to add slashes to it. It is very important to my codeigniter integration navigation scheme.

    With posts I can add slashes or what ever to the beginning of the permalink structure as in article/view/%post%/ and it works great. Just can't do this with pages.

    I can work it out on the codeigniter side I think if I use the parent page structure to get to the controller and handle parsing the rest from there. Basically at a minimum I need the url to be dev.local/wpfire/blog/thepagename so it will get directed to my 'blog' controller in codeigniter. The parent method should work.

    Thanks

  4. iansane
    Member
    Posted 2 years ago #

    Yes this works. Though it is rather irritating and scary that my pages are like this now.

    Page
    - view
    -- about
    -- contact

    and if anyone deletes page or view in wp dashboard it will break everything.

    I know this isn't a wp support issue since I'm trying to integrate codeigniter but there should be some way to add to the url without having to make parent pages. I appreciate if anyone has any suggestions.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic