Skip to content

Commit 5de8256

Browse files
author
Eddie Machado
committed
Merge pull request eddiemachado-zz#477 from cfoellmann/flush
added flush_rewrite_rules on Theme switch
2 parents 7e05f95 + 20bd3ce commit 5de8256

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

library/custom-post-type.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
URL: http://themble.com/bones/
1515
*/
1616

17+
// Flush rewrite rules for custom post types
18+
add_action( 'after_switch_theme', 'bones_flush_rewrite_rules' );
19+
20+
// Flush your rewrite rules
21+
function bones_flush_rewrite_rules() {
22+
flush_rewrite_rules();
23+
}
1724

1825
// let's create the function for the custom type
1926
function custom_post_example() {

0 commit comments

Comments
 (0)