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?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
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' );