Understanding Permalinks on Custom Post Types

Your post_type slug will default to the name of the post_type unless specified otherwise. So, in it’s most basic form you can set a custom base slug as follows,

'rewrite' => array( 'slug' => 'slug-name-here');

Currently, you have it set to true only.

Don’t forget to visit your permalinks page in the dashboard to flush your rewrite rules after you make your changes to get the new base rule to work!

Also take a look at,

http://codex.wordpress.org/Function_Reference/register_post_type

Which contains a great deal of information about the parameters associated with custom post types, including the initial rewrite rule. You can do some advanced things to meet numerous scenarios with rewrite rules, but for the most basic of requirements you can rely on the above suggested snippet.

I’d provide more examples, but I’m writing from a phone…

Good luck!

Leave a Comment