wordpress snippets last updated   : July 14, 2014
we now have 634 snippets

Fix the read more link when using query_posts

wordpress snippet

When using query_posts to customize the query you may find that the “read more…” link no longer functions. Fixing this issue will require you to reset the $more variable. Add the following snippet just before the loop and things will start functioning properly again.

read more

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

Auto link post thumbnails to the post permalink

wordpress snippet

Adding this code to the functions.php of your wordpress theme will Automatically link all post thumbnails to the post permalink.

read more

Most popular posts using views post meta

wordpress snippet

A few days ago Bob posted a comment asking about using the post views snippet to display the most popular posts. So here it is! place this snippet just before the loop within the index.php template and wordpress will use the post views to order your posts from highest to lowest. Don’t forget that for this to work you will need to setup the post views snippet.

read more

Adding page numbers to category, tag and post titles

wordpress snippet

Add this snippet to the title tag and meta descriptions to avoid duplicate content. Place within the header.php and Page 2 or above will be added to your wordpress pages.

read more

Add featured thumbnail to admin post columns

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add the featured thumbnail to the post listing within the wordpress admin. This is a featured I added to my theme so that when creating posts I could more easily see what posts I had added thumbnails to.

read more
jqsnipp.com | we just launched jquery snippets website