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?

  • 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 Jun 8 '15 at 14:27
  • does not seem to work. it no longer matches the custom post type slug it seems. – vico Jun 8 '15 at 14:37
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, privacy policy and cookie policy

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