【发布时间】:2019-09-12 11:52:20
【问题描述】:
我的自定义帖子类型“有效”有以下代码,但当前代码不允许链接上的分数“-”?我应该解决什么问题?
function works_rewrites_init($post_link, $post = 0){
add_rewrite_rule('works\/([A-Za-z0-9]+)?\/([0-9]+)?(page\/)?([0-9]+)?\/?$', 'index.php?paged=$matches[4]&post_type=works&workscat=$matches[1]&p=$matches[2]', 'top');
}
【问题讨论】:
标签: wordpress permalinks slug