wordpress snippets last updated   : July 14, 2014
we now have 634 snippets

Protect wordpress against malicious URL requests

wordpress snippet

Fantastic snippet from Perishable Press this snippet is great for the security to protect wordpress against malicious URL requests. I have attached a zip file with a download of this snippet as a plugin. Just ftp the single php file to your plugins folder and active as normal.

( download )

read more

Disable dragging of metaboxes within admin

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will disable all dragging of metaboxes within the admin. Please note that this includes dashboard widgets as well.

read more

Limit number of classes when using post_class

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you limit the number of classes displayed when using post_class, Yes this only works if you are using post_class() within your theme enjoy.

read more

Redirect based on user roles or capabilities

wordpress snippet

Redirecting based on a user role or capabilities could be a valuable addition depending on the needs of your WordPress site. This would allow you to redirect specific capabilities to a custom page with details about new content or features. You could also use this to redirect users with higher user roles directly to the WordPress wp-admin. For more details on the capabilities available in wordpress visit the wordpress codex. To use this snippet just add it to the functions.php of your wordpress theme and you will be redirect users based on roles or capabilities like a pro.

read more

Setup whitelist body_class to remove unwanted classes

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you create a white-list of terms to include in body_class. This is a great way to filter out many of the unwanted classes added

read more

Set the content type email from text/plain to text/html

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you set the content type of email from text/plain to text/html.

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