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

Display all posts within a dropdown menu

wordpress snippet

Adding this snippet to your wordpress theme will display a list of all your posts within a dropdown menu. You can adjust the number of posts displayed by changing the -1 value within the $args array.

read more
By : , on October 20, 2011 9:00 am

Expire protected post cookie with session

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme with a time of 0 in setcookie() forces the cookie to expire with the session. Great little snippet by Drew Jaynes thanks for submitting.

read more
By : , on October 19, 2011 9:00 am

Adjust settings on theme activation

wordpress snippet

Place this in your functions.php to adjust your default WordPress settings when activating your theme for the first time. This function also deletes the default post, page and comment that are created when you install WordPress.

read more
By : , on October 18, 2011 9:00 am

Display screenshot of any website using shortcode

wordpress snippet

Adding the first snippet to the functions.php of your wordpress theme will let you use the bellow shortcode to display a screenshot of any website.

read more
By : , on October 17, 2011 9:00 am

Count total number of jpg, gif, png images in media library

wordpress snippet

Adding the first snippet to the functions.php of your wordpress theme will display a count of all images within the media library. Add the second snippet in the location you wish to display the count total.

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

Add Tweetmeme button to your post with shortcode

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you add the Tweetmeme button to any location within your post.

read more
By : , on October 13, 2011 9:00 am

Display content based on user capability

wordpress snippet

Adding the first snippet to the functions.php of your wordpress will let you display content base on user capability. Use the second snippet in your posts with the corresponding capability. View the codex for more information on capabilities Great little snippet By Justin Tadlock.

read more
By : , on October 12, 2011 9:00 am

Countdown timer shortcode, display content after specified date

wordpress snippet

Adding the first snippet to the functions.php of your wordpress theme will let you use a shortcode to place a countdown timer on specific content within your post. Add the shortcode within the second snippet to your post with content you want to display after the specified date. I added a class of event so you can style the display of the message anyway you wish, enjoy!

read more