GET arguments
-
I have created a couple of custom functions in my functions.php to process a GET argument and pass it to a page
add_filter( ‘query_vars’, ‘addnew_query_vars’, 10, 1 );
function addnew_query_vars($vars)
{
$vars[] = ‘account’;
return $vars;
}
add_action(‘init’, ‘custom_rewrite_basic’);
function custom_rewrite_basic()
{
add_rewrite_rule(
‘^staff/([^/]+)([/]?)(.*)’,
‘index.php?pagename=staff&account=$matches[1]’,
‘top’
);
}Within the page template I get the ‘account’ variable with
$account = get_query_var( ‘account’ )
However it stops working when I activate the Permalink Manager plugin. My guess is that the rewrite rules are overwritten by the plugin.
Is there a way to process GET variables within the Permalink Manager plugin ?
Thank you very much for any advice,
Paolo
- The topic ‘GET arguments’ is closed to new replies.