Skip to content

Instantly share code, notes, and snippets.

@boyvanamstel
Created July 7, 2011 15:41
Show Gist options
  • Save boyvanamstel/1069792 to your computer and use it in GitHub Desktop.
Save boyvanamstel/1069792 to your computer and use it in GitHub Desktop.
Quick fix for 404 errors with custom post types
<?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