WPcustoms WordPress Snippets

Copy the code and paste it in your theme's functions.php file. It can be found in your theme's folder.
You can then run the function by simply typing echo the_functions_name(); wrapped in php brackets.

We take no responsibility that this code is working on your site.
However we do our best to provide tested and optimized snippets.

Change permalink structure with a function

This snippet is a good start to see how we can programatically change the permalink structure. You can change it from the admin panel: settings -> permalinks but in case you need to do this in a plugin or use it for custom post types this gets you started.