updated   : April 22, 2013
we now have 608 snippets

Remove <br /> after wp_list_categories

wordpress snippet

Adding this PHP code to your wordpress theme will remove the <br /> from wp_list_category().

read more

Good robots.txt

wordpress snippet

This is a good example of a robots.txt to use with your wordpress installation. Bellow the first example is one from smashing magazine. Yes yes I know, I know, not the best robot drawing in the world! have a better one? send it along ill replace my robot with yours.

read more

Disable dashboard widgets

wordpress snippet

Adding this first block of code to the functions.php of your wordpress theme will disable select widgets within your dashboard. Bellow is a list of widgets you can add to the list if you wish to disable them.

read more

Create dashboard widget

wordpress snippet

Adding this PHP code to the functions.php of your wordpress theme will add your custom dashboard widget. This is just the basic building blocks of your own custom dashboard widget.

read more

Post is older than

wordpress snippet

Adding this first block of code to your functions.php will allow you to check the age of a post to see if it is older than a set number of days. Great if you want to display some some information related to the post after set number of days or even stop displaying the post altogether.

read more

Private posts for logged in users

wordpress snippet

Using this as your wordpress loop will display posts with the custom field of private only to users that are logged into your website.

read more

Notify members on new posts

wordpress snippet

Adding this PHP code snippet to the functions.php of your wordpress theme will notify users of new posts. Please note that this snippet is best used for low volume sites. Large websites should consider alternative options.

read more

Set maximum post title length

wordpress snippet

Adding this PHP code to the functions.php of your wordpress theme will set a maximum number of words that can be displayed within your post title.

read more