wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Add and remove wordpress user roles

wordpress snippet

With WordPress you can add and remove roles very easily. The first snippet will add a new role called “manager” with some basic capabilities. You can view the WordPress roles and capabilities page for more extensive details on the capabilities available that you can assign to a custom role. The second snippet will remove some of the existing roles “editor, author, contributor, subscriber” however this could also remove a custom role. NOTE: if you remove an existing role it will be gone! So please be careful when removing roles.

read more

Disable theme, plugin editor and plugin, core updates

wordpress snippet

Adding the first line to your wordpress wp-config.php file will disable theme and plugin editor. Adding the second line to your wordpress wp-config.php file will disable plugin and core updates.

read more

Remove support for specific post type features

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove support for the specific features bellow from specified post types. Change the word ‘post’ to anything you like including a custom post type name or the default post, page.

read more

Disable content editor for specific page template

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will disable the content editor when a page is using a specific template. Don’t forget to change the name of the template file on line 08 this sample I have submit.php but can be changed to anything.

read more

Add TinyMCE font select to 3rd row, always visible

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will enable and place the font selection dropdown menu within the 3rd row. If in the 3rd row items will always be visible without selecting the kitchen sink button.

read more

Remove the theme editor submenu within admin

wordpress snippet

Posted a snippet yesterday to remove $submenu items but for some reason it does not remove the theme editor panel this way. Adding this snippet to the functions.php of your wordpress theme will remove the theme editor submenu. Or disable editor and plugin modifications entirely.

read more
jqsnipp.com | we just launched jquery snippets website