2

For example, the original URL would be http://localhost/category/sub_category/.

What I want is http://localhost/sub_category/, furthermore, I want to add an endpoint to the URL which looks like http://localhost/sub_category/endpoint/.

I've removed the "category" from the URL successfully by following this tutorial https://jonnyjordan.com/blog/how-to-remove-category-from-your-urls-in-wordpress/ .

But once I remove the "category" from the url, the add_rewrite_endpoint( 'endpoint', EP_CATEGORIES ) won't work…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.