By selecting the desired persistent connection structure:
Which is like this: http://localhost/%postname%/
Thanks to the following code of WordPress,
<? php add_action ('plugins_loaded', 'function_name'); ?>
I expect the above persistent connection settings to update itself automatically every time.
For this, we need to login to the admin panel and save the settings each time. But isn't there a way to automate it?
After a long period of research and testing, the results are very satisfactory. It successfully adjusts as you wish and works properly. Excellent.
function reset_permalink_settings()
{
global $wp_rewrite;
$wp_rewrite->set_permalink_structure( '/%postname%/' );
}
add_action( 'init', 'reset_permalinks' );
pealm.com