updated   : May 15, 2012
we now have 588 snippets
category template
By : , on February 24, 2012 12:30 pm

Add search form to specific wp_nav_menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add the search form to your wordpress wp_nav_menu. Don’t forget to update the MENU-NAME to specify the menu you wish to display within, just in case you have multiple menus.

read more
By : , on February 13, 2012 9:00 am

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
By : , on January 06, 2012 9:00 am

Display user with the most comments with count, email, author url

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you display the top commenter list of users. Use $result->comment_author_email, $result->comments_count, $result->comment_author_url, to add additional parameters to this snippet.

read more
By : , on December 23, 2011 9:00 am

Display attachment thumbnail with image metadata

wordpress snippet

Adding this snippet within the loop of your index.php template file will display a list of all post attachments with the following metadata (Credit, Camera, Focal Length, Aperture, ISO, Shutter Speed, Time Stamp, Copyright).

read more
By : , on December 22, 2011 9:00 am

Display external files in posts using shortcode

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will allow you to include the content of an external file within your page using shortcode.

read more
By : , on December 14, 2011 9:00 am

Entice stumbleupon visitors with custom message

wordpress snippet

Great little snippet by Filip Stefansson to display a custom message for people visiting via stumbleupon. Add this snippet to your wordpress template a good place is within the header.php.

read more
By : , on December 08, 2011 9:00 am

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
By : , on December 07, 2011 9:00 am

Display taxonomy terms in an unordered list

wordpress snippet

Adding this snippet to your wordpress theme will list the custom taxonomies that you registered for a custom post type.

read more