0

For the Permalink on wordpress setting I have

/%category%/%postname%/

This will show Post in different category like /blog/post_title_1/ or /event/post_title_1/

but now I have some Custom Post type such as Photo Gallery with the postype = photo-gallery and this no longer works and gives a 404 page. I want to stick to the normal archive template of archive-photo-gallery.php as the default template to pull instead of trying to create a page template for this. how do I tell wordpress to be show the custom post type url like how it used to show up when you have /%postname%/ in permalink setting?

2
  • Have you refreshed/flushed the permalinks since adding the CPT? Try hitting Admin > Settings > Permalinks page (no need to change or save - loading the page is enough) to see if this solves your 404.
    – jdm2112
    Commented Jun 8, 2015 at 14:27
  • does not seem to work. it no longer matches the custom post type slug it seems.
    – vico
    Commented Jun 8, 2015 at 14:37

1 Answer 1

0

Permalink settings on WordPress only affect posts of the type "post". Not custom types. For this you'll need to write a plugin or find one.

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.