Is there any filter to change the permalink structure and set it to post name after theme activation automatically?
i have custom posts but won't work without changing the permalink?
The flush rewrite rules to be considered while when custom posts are generated.
This worked for me as when my theme is activated every thing works file
/* Flush rewrite rules for custom post types. */ add_action( 'after_switch_theme', 'flush_rewrite_rules' );