$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Removing custom post type slug from URL|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Removing custom post type slug from URL

matteradmin10PV0评论

I want to remove custom post type slug from URL and for this I have used this solution Removing slug from custom post type URL

It is working fine but I also want to add category with custom post type name but when I tried to add category slug then it started to redirect to 404 page. I have added category to URL using Custom Post Type Permalinks plugin.

When I remove the code that I have added for removal of post type slug then category base URL also works but both these things are not working together.

For this I have tried many solutions and at the end I got same result. So for my website
example/postype/category/postname works
example/postname also works
but
example/category/postname redirects to 404 page. I update permalinks as well but nothing is working in this case. I will really appreciate your help.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far