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