Created
December 5, 2014 14:57
-
-
Save joshuadavidnelson/e242e01191a8567f80e1 to your computer and use it in GitHub Desktop.
Add custom query variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add to your theme functions file | |
*/ | |
// Add query variable | |
add_filter( 'query_vars', 'jdn_add_query_vars' ); | |
function jdn_add_query_vars( $vars ){ | |
$vars[] = "yr"; | |
return $vars; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment