Last active
August 29, 2015 14:24
-
-
Save taija/5c4a68ed8c18f7482c7c to your computer and use it in GitHub Desktop.
Clubs Plugin flush fix
This file contains hidden or 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
function clubs_rewrite_flush() { | |
// First, we "add" the custom post type via the above written function. | |
// Note: "add" is written with quotes, as CPTs don't get added to the DB, | |
// They are only referenced in the post_type column with a post entry, | |
// when you add a post of this CPT. | |
// Both the custom post type and the custom taxonomy need to be called in this instance | |
create_club_post_type(); | |
create_clubs_taxonomies(); | |
// You should *NEVER EVER* do this on every page load!! | |
flush_rewrite_rules(); | |
} | |
register_activation_hook( __FILE__, 'clubs_rewrite_flush' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment