Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Register custom query vars
* Register custom query vars
* @param array $vars The array of available query variables
* @link
function myplugin_register_query_vars( $vars ) {
$vars[] = 'key1';
$vars[] = 'key2';
return $vars;
add_filter( 'query_vars', 'myplugin_register_query_vars' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.