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
版权声明:本文标题:plugin development - Wordpress Custom URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744767654a2624137.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论