I'm trying to get $_Get style variable on my permalinks of just one page. It's the live events page.
So I want links like "http://strawsmusic.loc/live/?event=1330232400" but they just get converted to "http://strawsmusic.loc/live/".
I followed these steps in the codex, but they don't seem to work?
http://codex.wordpress.org/Custom_Queries#Custom_Archives
I should mention that I am running wordpress in MAMP. I tried it with Twenty Eleven to see if it was my theme, but I guess not...
Here is the code I added to functions.php
add_filter('query_vars', 'event_queryvars');
function event_queryvars($qvars) {
$qvars[] = 'event';
return $qvars;
}
And in the relevant template file:
global $wp_query;
if (isset($wp_query->query_vars['event'])) {
$event = esc_attr($wp_query->query_vars['event']);
}