plugin development - Wordpress Custom URL

i have a self coded plugin with a rewrite rulefunction custom_rewrite_rule1() { add_rewrite_rule('^([^]+)?'

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744767654a4592557.html

相关推荐

  • plugin development - Wordpress Custom URL

    i have a self coded plugin with a rewrite rulefunction custom_rewrite_rule1() { add_rewrite_rule('^([^]+)?'

    17小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信