admin管理员组文章数量:1391995
I want to make a custom post URL like domain/%category%/%post-name%
and I am able to do it but the problem is, the pages, posts showing 404.
I registered a custom post named download
with array('slug' => '%download_category%', 'with_front' => false);
there is download_category
associated with download
post type.
This is the rewrite rule add_rewrite_rule( '^/(.*)/(.*)/?$', 'index.php?post_type=download&name=$matches[2]', 'top' );
And post link set correctly.
It is working fine. But the problem is, other pages show me 404. below is the screenshot with Query monitor request.
How can I solve it? Any help is appreciated.
本文标签: How can achieve this permalink perfectly domaincomcategorypostname
版权声明:本文标题:How can achieve this permalink perfectly? domain.com%category%%post-name% 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744768305a2624179.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论