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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744768306a4592599.html
评论列表(0条)