update permalinks in WordPress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. global $wp_rewrite;
  2. $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%postname%/' );
  3. $wp_rewrite->flush_rules();

URL: http://trepmal.com/scripts/updating-permalink-structure-from-a-plugin/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.