Last active
August 29, 2015 14:11
-
-
Save andrej1c/0bc42dc1cedc79a01c0b to your computer and use it in GitHub Desktop.
Force Flush Permalinks in WordPress
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 | |
function ac_flush_permalinks() { | |
global $wp_rewrite; | |
$hard = true; | |
$wp_rewrite->flush_rules( $hard ); | |
} | |
// Uncomment line below to force flush permalinks. Then comment back out. | |
// add_action( 'init', 'ac_flush_permalinks', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment