Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'init', 'listing_search_url' );
- function listing_search_url()
- {
- add_rewrite_tag('%type%', '([^&]+)');
- add_rewrite_tag('%search_location%', '([^&]+)');
- add_rewrite_rule(
- '^custom(/([^/]+))?/(/([^/]+))?/?',
- 'index.php?page_id=23&type=$matches[2]&search_location=$matches[4]',
- 'top'
- );
- flush_rewrite_rules();
- }
Add Comment
Please, Sign In to add comment