updated   : April 22, 2013
we now have 608 snippets
category posts

Get post ID

wordpress snippet

Adding this PHP code to your wordpress theme will display the current post ID.

read more

Disable post revisions

wordpress snippet

Adding this code to your wp-config.php will disable post revisions.

read more

Member only content

wordpress snippet

Adding this PHP code to the functions.php file of your wordpress theme will allow you to place content you only wish members to see within the members short code [member][/member].

read more

Read more link trick

wordpress snippet

This little trick will allow you to change the text within the more link. When creating a post after you click the more button wordpress places a HTML comment change the text after the word more to change the text displayed within the more link.

read more

Display word count

wordpress snippet

Adding this first PHP code snipp in your funtions.php then place the echo wcount(); within the loop of your wordpress theme and return the word count for the post.

read more

Custom post types

wordpress snippet

Adding this to your functions.php will enable product as a new post type like posts & pages. This is a great new feature in wordpress 3.0.

read more

Get posts outside loop

wordpress snippet

Adding this PHP code to your wordpress theme will allow you to query and display posts outside of the loop. You can place this code in any location of your theme.

read more

Posts this month

wordpress snippet

Adding this code to your template just before the loop will display posts from only the current month.

read more