Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Answering: http://lists.automattic.com/pipermail/wp-hackers/2012-August/044119.html
- * By: Mike Schinkel - http://about.me/mikeschinkel
- */
- add_action( 'parse_request', 'aeromaxx_parse_request' );
- function aeromaxx_parse_request( $wp ) {
- if ( preg_match( '#^/(draw-results|ball-statistics)/game/([^/]+)/#', $_SERVER['REQUEST_URI'], $matches ) ) {
- $wp->query_vars = array(
- 'post_type' => $matches[1], // Assumes your post types are registered with same name as your URL slugs
- 'game' => $matches[2], // Assumes your taxonomy is registered as 'game'
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement