How to Automatically Set the First Image of a WordPress Post as the Featured Image This snippet automatically sets the featured image by fetching the first image of the WordPress post.
How to Modify WordPress “img src” for the “get_the_post_thumbnail” Expose the Wordpress "img src" part from the get_the_post_thumbnail, to modify the "img src" syntax.
How to Display Content Only on the WordPress “Front Page” This WordPress snippet enables you to display content only on the WordPress "Front Page".
How to Display WordPress 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 ...
How to Show WordPress Author Bio Excerpt in Posts This WordPress snippet enables you to show a short intro (excerpt) of the WordPress author-bio of a post.
How to Get WordPress Featured Image Source (img src) With the WordPress function: wp_get_attachment_image_src, you can get the img src of the featured image.
How to Disable the WordPress JSON REST API Without Plugin The WordPress JSON REST API can be useful for developers building integrations for WordPress but it could also ...
How to Display WordPress Sitename and Description in Templates This WordPress snippet will display the site(blog) name and site description in your WordPress theme templates.
How to Display Content for Mobile or Desktop Only Using WordPress “wp_is_mobile”. This WordPress snippet will use WordPress built-in "mobile detect" function "wp_is_mobile" to create a simple shortcode that can hide ...
How to Create Conditional “IF” Statements for WordPress Custom Meta Fields How to output content based on WordPress meta fields - and use conditions (statements) based on wether or not ...