This snippet automatically sets the featured image by fetching the first image of the WordPress post.
Category: Code Snippets
Heres a little snippet that will display recent posts from a specific category in WordPress
This snippet will allow you to set custom excerpt lengths in your excerpt tag in your WordPress template
Heres a little trick on how to show a list of the most popular WordPress post by post read count - without using a plugin.
Heres a little tip on how to display a list of WordPress authors with avatars and username
Heres a little trick on how to remove the WordPress author prefix from the author slug (URL).
Heres a little trick on how to add custom WordPress user profile fields
If you wanted to add emphasis to the first post in your blog adding this snippet to the functions.php of your wordpress theme will add the class of “first” to your first post. Instructions Add this code to your functions.php file.
You can easily force specific pages to be secure in wordpress using the following simple little snippet. Just add the following snippet to the functions.php of your wordpress theme and specify the post / page ID desired. Instructions Add this code to your functions.php file.
Adding this to the functions.php of your wordpress theme will change the default mysite.com/author/name to mysite.com/profile/name, however you can change this to user or anything that you would like.