updated   : May 15, 2012
we now have 588 snippets
By : , on January 16, 2012 9:00 am

Remove support for specific post type features

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove support for the specific features bellow from specified post types. Change the word ‘post’ to anything you like including a custom post type name or the default post, page.

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 August 19, 2011 9:00 am

Highlight comments using #comment-hash and jquery

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add class=”highlight” to a comment when visiting a comment URL eg: wpsnipp.com/category/post/#comment-12 Don’t forget to create some css for the highlight class!

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

Remove the comments count column from pages

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove the comments count column from pages admin page.

read more
By : , on May 07, 2011 9:00 am

Count parent comments and replies separately

wordpress snippet

This snippet will count parent comments and replies separately. Add the first snippet to the functions.php of your wordpress theme then add the second snippet in the single.php or the theme you will to display the number of comments and comment replies.

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

Add shortcode support to comments

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will enable shortcodes for comments. This code will first remove all shortcodes when it gets to comments and reinitialize only the shortcodes listed within init_common_shortcodes function. I have added in a simple sample shortcode that will grab the users website url and replace the [mysite] shortcode.

read more
By : , on April 16, 2011 9:00 am

Count posts, pages, comments and custom post types

wordpress snippet

This is a selection of snippets to display counts for posts, pages, custom post types, comments. Posts and pages have a publish and draft status while comment counts include moderated, approved, spam, trash, total.

read more
By : , on April 10, 2011 9:00 am

Remove comments link from admin bar

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove the comment link from the admin bar.

read more