updated   : May 15, 2012
we now have 588 snippets
By : , on October 24, 2011 9:00 am

Microformatted and HTML5 compliant loop

wordpress snippet

Why not replace your existing wordpress loop within your theme to a microformatted and HTML5 compliant loop.

read more
By : , on July 30, 2011 9:00 am

Check for post type within loop using get_post_type

wordpress snippet

Adding this snippet within the loop of your wordpress theme will let you conditionally check for a specific post type. Just change the post type ‘products’ or ‘people’ to the post type you would like.

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

How to display multiple custom field values

wordpress snippet

Adding this snippet within the loop of your wordpress theme will let you display multiple instances of a custom field value.

read more
By : , on March 04, 2011 9:00 am

Redirect home page to a random blog post

wordpress snippet

This is a slight mod of the wordpress post from yesterday (Redirect home page to first blog post) and think you might enjoy it. Add this snippet to the index.php template of your wordpress theme before get_header(). Your home page will automatically redirect to a random post from your wordpress database.

read more
By : , on March 03, 2011 9:00 am

Redirect home page to first blog post

wordpress snippet

Place this snippet at the top of the index.php template of your wordpress theme before get_header(). Your homepage will then automatically redirect to the first blog post.

read more
By : , on January 28, 2011 2:00 pm

Display today’s posts only

wordpress snippet

Adding this PHP code to your wordpress theme will display your wordpress post but only from the current day.

read more
By : , on December 16, 2010 10:00 am

Shortcode outside the loop

wordpress snippet

Adding this code snippet to your wordpress theme will allow you call to shortcode within a template.

read more
By : , on December 14, 2010 4:00 pm

Get tags outside loop

wordpress snippet

Adding this PHP code to your wordpress theme will display a list of tags outside the loop.

read more