i developed a plugin (the backend at least) and now i want to add a frontpage to my blog. the url should look something like this
http://www.mywordpressblogalsoroot.com/mypluginname/param1/param2
http://www.mywordpressblogalsoroot.com/mypluginname/param1/
http://www.mywordpressblogalsoroot.com/mypluginname/
all this three urls should point to a plugins function or a php site with a loop, i dont know.
the params should be readable , i think with get_query_var
i played a bit with the following:
add_filter('rewrite_rules_array','gamecard_insertMyRewriteRules');
// Adding a new rule
function gamecard_insertMyRewriteRules($rules) {
$newrules = array();
$newrules['(gamecard)/(\d*)$'] = 'index.php?pagename=$matches[1]&gamecardslug=$matches[2]';
return $newrules + $rules;
}
// Adding the id var so that WP recognizes it
function gamecard_insertMyRewriteQueryVars($vars)
{
array_push($vars, 'gamecardslug');
return $vars;
}
something is happening, but i stuck a bit.
somebody can give me a pointer how to get all this done?
thanks