Auto Embed Videos with Advanced Custom Fields

How to auto embed using Advanced Custom Fields so the client doesn’t have to embed. All they have to do is enter the video’s url in the field.

Paste this in your theme where you want to use it.

Obviously, “the_field_name is replaced by the name in how you set up your custom field. And remember, “get_field” becomes “get_sub_field” if you’re dealing with repeaters.

Leave a Reply

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

91 − 85 =