Custom endpoint on product category doesn't work
-
Hello,
I need to have an alternative version of my website (just slightly altered affiliate links) and I would like to use an endpoint (“/altered”) for this:
function add_altered_query_var( $vars ){ $vars[] = "altered"; return $vars; } add_filter( 'query_vars', 'add_altered_query_var' ); function altered_endpoint(){ add_rewrite_endpoint( 'altered', EP_ALL); } add_action( 'init', 'altered_endpoint' );
Unfortunately this code 404s with a product category archive. Does anybody know why the endpoint doesn’t work?
Thanks for your help.
PS.: If anybody knows why endpoints fail on the top level domain (www.example.com/myendpoint works but shows blog page instead of static page) I’d be pleased by the answer.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Custom endpoint on product category doesn't work’ is closed to new replies.