admin管理员组文章数量:1336434
Ive just been reading @gmazzap s reply about wordpress matching URLs with trailing tildes.
and could do with some help please. As a coding newbie, I am not sure where to add his suggested code:
add_action('init', function() {
add_rewrite_tag( '%postname%', '([^~/]+)', 'name=' );
});
Functions.php, /includes/rewrite.php, or somewhere else...
Also what are the implications of doing this, when wordpress updates, will these changes be lost? Am running a child theme. Sorry to ask such basic questions. Thanks for your help.
本文标签: rewrite tagWhere to add addrewritetag for trailing tilde
版权声明:本文标题:rewrite tag - Where to add add_rewrite_tag for trailing tilde? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742295310a2448605.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论