Last active
August 29, 2015 14:26
-
-
Save rahularyan/c60868fbed0b696b7119 to your computer and use it in GitHub Desktop.
This file contains 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 | |
/** | |
* This filter will override AnsPress rewrite rule | |
* @param array $rules | |
**/ | |
function my_custom_ap_rewrite($rules){ | |
global $wp_rewrite; | |
$base_page_id = ap_opt('base_page'); | |
$rules["categories/?$"] = "index.php?page_id=".$base_page_id."&ap_page=categories"; | |
$rules["tags/?$"] = "index.php?page_id=".$base_page_id."&ap_page=tags"; | |
return $rules; | |
} | |
add_filter('ap_rewrite_rules', 'my_custom_ap_rewrite' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment