Skip to content

Instantly share code, notes, and snippets.

@feedmeastraycat
Created January 11, 2013 21:53
Show Gist options
  • Save feedmeastraycat/4514259 to your computer and use it in GitHub Desktop.
Save feedmeastraycat/4514259 to your computer and use it in GitHub Desktop.
WP rewrite example.
<?php
add_rewrite_rule('english/news/([^/]+)(/[0-9]+)?/?$', 'index.php?english=$matches[1]&page=$matches[2]', 'top');
add_rewrite_rule('english/press/press-releases/([^/]+)(/[0-9]+)?/?$', 'index.php?english=$matches[1]&page=$matches[2]', 'top');
flush_rewrite_rules();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment