Created
July 7, 2011 15:41
-
-
Save boyvanamstel/1069792 to your computer and use it in GitHub Desktop.
Quick fix for 404 errors with custom post types
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 register_pt() { | |
register_post_type([...]); | |
// Stop 404's from happening.. | |
flush_rewrite_rules( false ); | |
} | |
add_action( 'init', 'register_pt' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment