• This is a long shot, but I ran into a bit of snag with permalink structures. My initial goal was to have a posts page called News & Updates. I wanted my permalink structure for both categories and posts to match the posts page. So here’s what my permalinks look like…

    Posts Page:
    http://www.mysite.com/news/

    Post Category:
    http://www.mysite.com/news/category/

    Single Post:
    http://www.mysite.com/news/category/post

    To achieve this I used the Custom Permalinks options in Settings > Permalinks. The custom structure I used is

    /news/%category%/%postname%/

    It’s works great and serves it purpose. I was even able to get breadcrumbs to reflect my structure!

    So the problem I’ve run into. I’m trying to create a custom post type for events. The only major issue is my events permalinks look like this…

    http://www.mysite.com/news/events/event-name

    Does anyone have an idea how I can get the permalink to read like the following while preserving the permalink structure for normal posts and categories?

    http://www.mysite.com/events/event-name

Viewing 1 replies (of 1 total)
  • set “rewrite” => array(“with_front” => false) in arguments of register_post_type.

    register_post_type(" post_type_name", array(
        "rewrite" => array( "with_front" => false)
    ));
Viewing 1 replies (of 1 total)

The topic ‘Custom Post Type Permalink Structure’ is closed to new replies.