Initialize custom post types before flushing rewrite rules on activation
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
// Flush rewrite rules on activation to make sure permalinks work properly
|
// Flush rewrite rules on activation to make sure permalinks work properly
|
||||||
function sp_rewrite_flush() {
|
function sp_rewrite_flush() {
|
||||||
|
sp_event_cpt_init();
|
||||||
sp_team_cpt_init();
|
sp_team_cpt_init();
|
||||||
|
sp_table_cpt_init();
|
||||||
|
sp_player_cpt_init();
|
||||||
|
sp_list_cpt_init();
|
||||||
|
sp_staff_cpt_init();
|
||||||
flush_rewrite_rules();
|
flush_rewrite_rules();
|
||||||
}
|
}
|
||||||
register_activation_hook( __FILE__, 'sp_rewrite_flush' );
|
register_activation_hook( __FILE__, 'sp_rewrite_flush' );
|
||||||
|
|||||||
Reference in New Issue
Block a user