Save permalinks programmatically


function change_permalinks()
{
global $wp_rewrite;
$wp_rewrite->set_permalink_structure('/%postname%/');
$wp_rewrite->flush_rules();
}
add_action('init', 'change_permalinks');

Leave a Comment

Your email address will not be published.