I’m creating a film portfolio and I have created the custom post type for portfolio items with a field for the Vimeo link. WordPress is not automatically embedding Vimeo links when I echo the url onto the page and is instead the url is displaying as plain text. I’ve tested by creating a post with the video link and that is auto-embedding just fine. Heres the code I’m using:
<?php echo get_post_meta(get_the_ID(), 'vimeo_link', TRUE); ?>
If I’m not mistaken, WordPress doesn’t oEmbed inside of actual theme files. Instead, you’ll need to do something like this
if statement reference