Skip to content

Instantly share code, notes, and snippets.

@Deaner666
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deaner666/b25c25e5b8cf4f03b9e9 to your computer and use it in GitHub Desktop.
Save Deaner666/b25c25e5b8cf4f03b9e9 to your computer and use it in GitHub Desktop.
Declare custom URL parameters in WordPress
<?php
// Declare custom URL parameters
add_filter( 'query_vars', 'wpm_add_query_vars_filter' );
function wpm_add_query_vars_filter( $vars ) {
$vars[] = "tier";
$vars[] = "second-param";
$vars[] = "third-param"; // etc.
return $vars;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment