Эх сурвалжийг харах

added flush_rewrite_rules on Theme switch

Christian Foellmann 12 жил өмнө
parent
commit
20bd3ce0ff

+ 7 - 0
library/custom-post-type.php

@@ -14,6 +14,13 @@ Developed by: Eddie Machado
 URL: http://themble.com/bones/
 URL: http://themble.com/bones/
 */
 */
 
 
+// Flush rewrite rules for custom post types
+add_action( 'after_switch_theme', 'bones_flush_rewrite_rules' );
+
+// Flush your rewrite rules
+function bones_flush_rewrite_rules() {
+	flush_rewrite_rules();
+}
 
 
 // let's create the function for the custom type
 // let's create the function for the custom type
 function custom_post_example() { 
 function custom_post_example() {