How to display WordPress custom fields with conditional statements

Sometimes you need to display post-specific content using WordPress 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-id” defined, the content will be rendered.

Insert content as shown below.


Leave a Reply

Your email address will not be published. Required fields are marked *