admin管理员组文章数量:1023195
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?
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 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
Reset to default 0Permalink 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.
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?
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 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
Reset to default 0Permalink 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.
本文标签: Wordpress Permalink Custom Post type
版权声明:本文标题:Wordpress Permalink Custom Post type 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745553051a2155721.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论