Skip to content

Instantly share code, notes, and snippets.

@educartoons
Last active November 7, 2018 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save educartoons/38a85e6b784e97b2c32d0a5c298dfcf1 to your computer and use it in GitHub Desktop.
Save educartoons/38a85e6b784e97b2c32d0a5c298dfcf1 to your computer and use it in GitHub Desktop.
function chaplains_init() {
global $wp,$wp_rewrite;
$wp_rewrite->add_rule('chaplains/([0-9]{4})/?$',
'index.php?pagename=mypage&id=$matches[1]', 'top');
// $wp_rewrite->flush_rules(false);
}
add_action('init','chaplains_init');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment