wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Track post and page views by user ID, date and time

wordpress snippet

After an interesting conversation with a fan of wpsnipp, I come up with something to track unique post views for registered users. However this neat little snippet does a little more than that. First add wps_trackViewDates(); within the loop of your single.php template file. Once this has been added, the snippet will track the ID of the user that viewed an individual post along with the date and time it was viewed.

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

Display post views within admin post columns

wordpress snippet

I posted a cool snippet yesterday to (track post views using post meta) I wanted to add a little to that today. Adding this snippet to the functions.php of your wordpress theme will display the post views next to each post in the wordpress admin.

read more

Track post views without a plugin using post meta

wordpress snippet

Use the following snippet to track post views on your wordpress blog. The first thing you want to do is add this snippet to the functions.php of your wordpress theme. Follow step 1. and step 2. to track and display the number of views for each post.

read more