faulty links result in video not playing
-
The reason is that the link to the styles and scripts are faulty if you have an install in a subdirectory.
The Plugin uses
bloginfo('url')
to fetch the domain name. However when linking to scripts and styles, it can cause trouble as wordpress cannot find it.Changing rows 301 from
echo "<link rel='stylesheet' href='" . get_bloginfo('url') . "/wp-content/plugins/youtube-sidebar-widget/style.css' />";
to
echo "<link rel='stylesheet' href='".plugins_url( 'style.css', __FILE__ )."' />";
Helped me out.
Then do the same for the script in the footer.
echo "<script type='text/javascript' src='" . get_bloginfo('url'). "/wp-content/plugins/youtube-sidebar-widget/script.js'></script>";
changes to
echo "<script type='text/javascript' src='" . plugins_url( 'script.js', __FILE__ ). "'></script>";
hope to see this in upcoming updates. Worked like a charm after I found that.
- The topic ‘faulty links result in video not playing’ is closed to new replies.