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

How to display content for mobile- or desktop only using WordPress “wp_is_mobile”.

Did you know that you can use WordPress built-in “mobile detect” function wp_is_mobile to create a simple shortcode that can hide certain parts of your content from mobile visitors and-/or desktop visitors. The wp_is_mobile function returns true when your site is viewed from a mobile browser. Using this function you can create adaptive-/responsive wordpress themes …

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.