WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Permalinks
[resolved] Hierarchical Page Permalinks No Longer Work (10 posts)

  1. cmurockstar
    Member
    Posted 3 years ago #

    This Plugin is So Close to working.

    So when I start it up, it works great. Perfect. Then if I got to Settings->Permalinks and "save," then the permalinks to ALL PAGES but the custom post types stop working. My guess is that you are using the same permalink tag for the post name for ALL pages, not just the one custom one I edited.

    Any way you can fix this bug?

    http://wordpress.org/extend/plugins/custom-post-permalinks/

  2. cmurockstar
    Member
    Posted 3 years ago #

    PS. When I disable your plugin, go BACK to Settings->Permalink, reload it, then re-save it, all my old links then work. Clearly, something is not working correctly when you save the settings on the permalinks settings page.

  3. cmurockstar
    Member
    Posted 3 years ago #

    (and i have to disable/renable the custom post type plugin I am using)

  4. cmurockstar
    Member
    Posted 3 years ago #

    Though i think it takes a while for all the links to get re-established.

    Can you please take a look at this bug.

  5. John P. Bloch
    Member
    Plugin Author

    Posted 3 years ago #

    What is your permalink structure? If I had to guess, I'd say it's just the slug. If so, that's not anything I can fix. You'll have to differentiate your permalinks somehow. Most people do this by prefixing the permalink structure with the post type.

  6. cmurockstar
    Member
    Posted 3 years ago #

    You are right, I was using the same structure as I was using for the rest of my site. Now when I use /foo/[permalink i wanted] it works.

    Thanks!

  7. John P. Bloch
    Member
    Plugin Author

    Posted 3 years ago #

    No problem!

  8. thecodezombie
    Member
    Posted 3 years ago #

    Seem to be having a similar scenario to cmurockstar.

    Started work on a site, had two pages already created and built (/contact/ and /about/), then went to work on two C.P.T's. I've got Clients (/clients/%clients%/ - normal) and I've got Events (/%category%/%event%/ - category-based)...using this plugin to re-write the Event URL.

    Now my C.P.T's are working as intended, but my pages are now broken (404). I need to retain nice URL's (/contact), so putting /page/contact isn't really an option.

    Any help / tips / advice will be greatly appreciated.

  9. John P. Bloch
    Member
    Plugin Author

    Posted 3 years ago #

    You can't put categories first on CPTs. Like I keep saying: you have to differentiate your permalinks with a non-wildcard (post type, year, month, day, or non-rewrite-tag plain text) beginning. WordPress' rewrite engine, for better or worse, does not support what you are trying to do. Period.

  10. thecodezombie
    Member
    Posted 3 years ago #

    Hi John,

    Cheers for the explanation.

    I ended up putting an 'events' prefix on the Events C.P.T re-write in order to differentiate it from the normals.

    Weird thing is, I'm using a 'No Category Base' plug-in to strip the normal pre-fix of 'category/', and it has stripped out the 'event/' too! So I've actually managed to get what I initially intended!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic