Exact matches only
Search in title
Search in content
Search in comments
Search in excerpt
Filter by Custom Post Type

How to get featured image source (src)

With the WordPress function: wp_get_attachment_image_src, you can get the src of the featured image. Instructions Add this code to your page/post template file where you want to use the featured image source.

How to display custom fields with conditional statements

Sometimes you need to display post-specific content using custom fields. In this example we will show you how you can display custom field data using conditional statements in the form of a youtube video embed. If the post has a "youtube-video-link" defined, the content will be rendered.

Multiple excerpt lengths

This snippet will allow you to set custom excerpt lengths in your excerpt tag in your template. Instructions Add this code to your functions.php file. And then use this syntax to invoke your custom excerpt length in your template:

Show most popular posts without a plugin

Heres a little trick on how to show a list of the most popular post by post read count – without using a plugin. Instructions Add this code to your functions.php file. Then add this anywhere in your template where you wish to display the posts.