How can achieve this permalink perfectly? domain.com%category%%post-name%

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

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

相关推荐

  • How can achieve this permalink perfectly? domain.com%category%%post-name%

    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

    6天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信