• Dear all,

    Firstly the custom post types work perfectly. Regular pages however only work when the permalink setting is /archive/%post_id%/ (‘archive’ can be replaced with anything)

    I solely wish to use /%post_id%, however, this results in a 404 error for pages only, custom post types are unaffected.

    example:
    With permalinks set to /archive/%post_id%:
    https://www.sitename.com/landing works perfect, along with the rest of the site

    With permalinks set to /%post_id%:
    All pages, including https://www.sitename.com/building result in 404 error. Custom post types however (example url: https://www.sitename.com/building/house/fifth_street are unaffected.

    I am using custom post types and custom taxonomies and I have a feeling this may be affecting.

    I would also like to use custom taxonomy terms in the rewrite rules.

    Any solutions for either problems?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just /%postname%/ does not work in all installations, that page problem is exactly whey. Custom post types get a ‘label’ that is used in the permalink. I use /%post_id%/%postname%/ which results in /1/firstpost for normal posts and /blog/firstpost for custom post types.
    Perhaps this information is of some help.

    Thread Starter markgia

    (@markgia)

    Thanks for the reply Roy! Good to know its not just an isolated case.

    I’ll go down your route and try and modify the permalink with some hooks/filters.

    Thread Starter markgia

    (@markgia)

    /%post_id%/%postname%/ results in 404. Any ideas what I can do?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalink issue with custom post types’ is closed to new replies.