1

I have custom post types on my wordpress site and I've set the slugs to say "/blog/{post_type}/{post_title}".

I'm using the default post type as a "notes" section, so I want that slug to be "/blog/notes/{post_title}". Is this possible?

1
  • Guessing your post type is called something other than "notes"?
    – GhostToast
    Commented Jan 29, 2014 at 14:54

2 Answers 2

2

There are many »default post types« like post, page or even nav_menu_item. If you talking about post as the default just go to Settings → Permalinks admin page, chose »custom structure« and use /blog/notes/%postname%/ as your structure.

5
  • 4
    Wouldn't that change the permalinks for all pages as well?
    – DannyM
    Commented Jan 29, 2014 at 14:47
  • Tried this, but now all my custom post types permalinks are "/blog/notes/blog/{post_type}/{title}"
    – DannyM
    Commented Jan 29, 2014 at 14:50
  • 2
    How do you define the custom post types? I guess you need to define the rewrite => with_front key to FALSE.
    – David
    Commented Jan 29, 2014 at 14:56
  • Ahh, that was what I was missing! That works great.
    – DannyM
    Commented Jan 29, 2014 at 15:02
  • Not best answer I think, should choose the next one instead.
    – Joel M
    Commented Jun 20 at 17:19
8

You can change the structure in your Permalink settings and you can also change the slug in the code you used to register the post type and then re-save your Permalinks.

'rewrite' => array( 'slug' => 'portfolio', 'with_front' => false ),

In the above example, the slug is portfolio which can be changed.

Read more under the Rewrite section http://codex.wordpress.org/Function_Reference/register_post_type

1
  • This isn't working for me when trying to change the slug of the 'post' post type, via one of a couple different filters. I do polylang installed, not sure if that could be interfering.
    – Joel M
    Commented Jun 20 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.