Search
Exact matches only
Search in title
Search in content
Search in comments
Search in excerpt
Filter by Custom Post Type

How to change the WordPress default excerpt length

This snippet will let you define a new default excerpt length for the WordPress excerpts output. The following example will set the default excerpt length to 20 characters.

Force specific WordPress pages to be secure, ssl, https

You can easily force specific pages to be secure in wordpress using the following simple little snippet. Just add the following snippet to the functions.php of your wordpress theme and specify the post / page ID desired.

How to remove unwanted WordPress classes

This snippet 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 css classes added.

WP-Snippet.com

Your no.1 source for WordPress snippets, hacks & modifications.