Skip to content

Instantly share code, notes, and snippets.

Created January 19, 2016 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/56d7559ebc2cf4c79cdd to your computer and use it in GitHub Desktop.
Save anonymous/56d7559ebc2cf4c79cdd to your computer and use it in GitHub Desktop.
add_action("init", function()
{
add_rewrite_rule(
'^organisator/([^/]*)-([^/]*)/?$',
'index.php?pagename=organisator&organiser_id=$matches[1]&organiser_name=$matches[2]',
'top'
);
add_rewrite_tag('%organiser_id%', '([^/]*)');
add_rewrite_tag('%organiser_name%', '([^/]*)');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment