This snippet will display absolutely all custom fields for each post. Even custom fields you may not even be aware exist like
_edit_lock and others. We have Justin Sternberg to thank for writing this snippet that was submitted a while ago as part of his tutorial on wordpress custom fields. Since this snippet is not available other than in the tutorial I figure it should be posted separately.
I have needed to move a post column like “date, tags, author” or even a custom column within the wordpress admin. This is a simple method that I used to change the order of columns within the admin. What you have is two variables you will need to change
$before. Move is the name of the column you would like to move. Before is the name of the column you would like to move it before. The following snippet will let you move the author column before the post title column.
this months featured snippets
Have you ever wanted to change the default role names “Administrator, Editor, Author, Contributor, Subscriber” within wordpress? Add this little snippet to the functions.php of your wordpress theme. This snippet will let you change any of the existing role names to anything that you would like. This will of course display within the role select menu for users.
“Please note this does not add a new role or permanently change the name”read more
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
If you are creating a new theme either for sale of for a client you may want to have it create a custom page or pages when the theme is activated. Adding this snippet to the functions.php of your theme will do just that.read more
If you need to block all users but the administrators from wp-admin just add this snippets to the functions.php of your wordpress theme. This snippet will redirect everyone but the admin back to the primary domain.read more