admin管理员组

文章数量:1391955

i have a self coded plugin with a rewrite rule

    function custom_rewrite_rule1() {
    // add_rewrite_rule('^([^/]+)/?','index.php?page_id=$matches[1]&page=$matches[2]&memberID=$matches[3]&land=$matches[4]&fa=$matches[5]&vorname=$matches[6]&nachname=$matches[7]','top');
   //add_rewrite_rule('userprofile\/(Z\d*)','index.php?p=451&memberID=$matches[1]','top');
   add_rewrite_rule('userprofile\/(\w*)\/(\w*)\/(\w*)\/', 'index.php?page_id=451&land=$matches[1]','top');
   //userprofile\/(\w*)\/(\w*)\/(\w.)_(\w*)_(\w*)_(Z\d*)

   //add_rewrite_rule('userprofile\/(\w*)\/(\w*)\/(\w.)_(\w*)_(\w*)_(\w*)_(Z\d*)', 'index.php?page_id=451&land=$matches[1]&memberID=$matches[6]','top');
   add_rewrite_rule('userprofile\/(\w*)\/(\w*)\/(\w._)?(\w*)_(\w*)_(\w*)_(Z\d*)', 'index.php?page_id=451&land=$matches[1]&memberID=$matches[7]','top');
}

The Final URL looks like :

but i need to get the userprofile removed from the url, this is the PageName!

can anyone help me?

本文标签: plugin developmentWordpress Custom URL