Add extra parameters after permalink

Posted by Prem Tiwari | Updated on

You can add an endpoint to your URIs to handle special requests to add extra parameters after permalink:


add_filter( ‘request’, ‘t5_set_epex_var’ );

* Make sure that ‘get_query_var( ‘epex’ )’ will not return just an empty string if it is set.
* @param array $vars
* @return array
function t5_set_epex_var( $vars )
isset( $vars[‘epex’] ) and $vars[‘epex’] = true;
return $vars;

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers