Ok, ich hab mein Problem lösen können.
In die functions.php kommt:
// here we register the variables that will be used as parameters on the url
function add_my_var($public_query_vars) {
$public_query_vars[] = 'shopname'; // shopname
return $public_query_vars;
}
add_filter('query_vars', 'add_my_var');
// building the rewrite rules, for the two parameters
function do_rewrite() {
add_rewrite_rule('(shop)/[/]?([a-zA-Z0-9]*)[/]?$', 'index.php?pagename=shop&shopname=$matches[2]','top');
}
add_action('init', 'do_rewrite');
im theme kann ich dann die variable ausgeben:
echo "shopname:" .get_query_var( 'shopname' )