Testing the excellent External Videos plugin by silviapfeiffer1.
I’m trying to have it automatically post a single video on our home page automatically when one is created in YouTube.
Instead of creating a static page in WP with “[external-videos feature=”embed”]” that will never be edited, I’d instead like to place the shortcode code directly in my front-page.php file. that way I’ll get more control over how the video is displayed and avoid a “home” page sitting around in my admin forever.
Currently if I copy everything out of ev-shortcode.php into my front-page.php file it complains
Cannot redeclare sp_external_videos_gallery()
which makes sense because it’s already included in the plugin, so I comment out the line
require_once(WP_PLUGIN_DIR . ‘/external-videos/ev-shortcode.php’);
from external-videos.php,.. the error goes away, but it doesn’t fetch any video?
Any ideas? I’m sure I don’t need all that shortcode code either. I could probably get away with a couple lines of a query_post. I’ll keep messing around with it, but if anyone has any suggestion or has done this, please let me know.
- The topic ‘[Plugin: External Videos] Use Shortcode in my template?’ is closed to new replies.