Require a Featured Post Image This code sends an admin message if a featured image is not set for the...
Randomize your posts Add this code snippet to your functions.php file. It jumps into the pre_get_posts hook and...
Show current child category in template This function displays the post's current child category name.
automatically add custom meta field values to posts Auto-add custom meta field values with this function to all posts. This can be extended...
Shorten category classes in post_class Using post_class prints all category slug names the post belongs to. This may lead to...
Limit post title character count Truncate the post title and limit it to X characters. A quite easy function to...
List posts from same category This goes inside the loop on single.php - This lists all the posts in the...
Ignore sticky posts from the main query We use the pre_get_posts filter to modify the main query and set it to ignore...
Dynamically use parent template for child pages If you use a specific template for a parent page this function automatically uses this...
Check if post has a gallery A simple check if the current post\page has a gallery shortcode within the post_content. Show...