Custom Post Type – Rewirting Slugs
-
Hi,
I’ve created a CPT, lets say “Services” and registered it as “services”. It works well, I can access service posts at /services/post_slug.
I want to update the plugin so that “services” in the slug is replaced with “solutions”. So I’ve added in the following code to the args array for the CPT registration:
‘rewrite’ => array(‘slug’ => ‘post_type’)
Now links are automatically generated like this “/solutions/post_slug” which is perfect, however when followed I get a 404.
Can anyone tell me why posts aren’t loading after having added in the slug rewrite?
-
-
Hi lillyeffect, thanks so much for the reply, worked instantly. Can’t believe I didn’t think of this, now that you mention it I recall other people having this issue in the past.
Thanks again!!
- The topic ‘Custom Post Type – Rewirting Slugs’ is closed to new replies.