/ Published in: PHP
Embed a video via PHP without using `the_content` filter in WordPress. From luckykind at http://wordpress.org/support/topic/call-function-called-by-embed-shortcode-direct
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $wp_embed = new WP_Embed(); $post_embed = $wp_embed->run_shortcode('[embed]your-video-url[/embed]'); ?>