Created
June 3, 2013 20:29
-
-
Save Clorith/5701123 to your computer and use it in GitHub Desktop.
wordpress custom rewrite rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function theme_rewrites( $wp_rewrite ) { | |
$rules = array( | |
'coordinates/([^/]+)/?$' => 'index.php?pagename=coordinates&coords=$matches[1]', | |
); | |
$wp_rewrite->rules = array_merge( $rules, $wp_rewrite->rules ); | |
} | |
add_action( 'generate_rewrite_rules', 'theme_rewrites' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment