Created
October 1, 2018 02:39
-
-
Save joemaller/a13109402308238adb58a4d9432a8886 to your computer and use it in GitHub Desktop.
flush WordPress rewrite rules on every page load
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 | |
/** | |
* Expensive, but helpful if permalink structures are changing freuqently | |
* Don't do this on a production site. | |
*/ | |
add_action('init', 'flush_rewrite_rules'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment