繁体   English   中英

在Wordpress中包括外部链接的Javascript

[英]Including external linked Javascript in Wordpress

我想在wordpress页面上包含一个外部托管的功能/视频播放器,上面几乎没有其他内容。 该功能是由外部提供商开发和托管的,因此我无法控制它。 他们为我提供了以下代码,并指示我复制并粘贴到页面中,但这不起作用。

不幸的是,我对JS没有任何工作知识。 有人能够帮助我做些什么。 我需要编辑一些functions.php还是应该可以一次性使用?

<!-- Start of Brightcove Player -->

<div style="display:none">

</div>

<!--
By use of this code snippet, I agree to the Brightcove Publisher T and C 
found at https://accounts.brightcove.com/en/terms-and-conditions/. 
-->


<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>

<object id="myExperience" class="BrightcoveExperience">
  <param name="bgcolor" value="#FFFFFF" />
  <param name="width" value="825" />
  <param name="height" value="650" />
  <param name="playerID" value="3058468026001" />
  <param name="playerKey" value="AQ~~,AAAACjHz08E~,HgXzSoYtBYxTAjnyep2-EpPyWh7pU7Jr" />
  <param name="isVid" value="true" />
  <param name="isUI" value="true" />
  <param name="dynamicStreaming" value="true" />

</object>

<!-- 
This script tag will cause the Brightcove Players defined above it to be created as soon
as the line is read by the browser. If you wish to have the player instantiated only after
the rest of the HTML is processed and the page load is complete, remove the line.
-->
<script type="text/javascript">brightcove.createExperiences();</script>

<!-- End of Brightcove Player -->

可以在此处的页面上查看:

http://www.treforestvets.com/pet-health-videos

我可以在链接中提供的页面的页面源中看到您的代码。 由于wordpress的默认格式化行为,已将其注释掉。

要使其起作用,请打开编辑器,删除该特定页面的所有先前编辑,然后尝试以编辑器的“ Text模式而不是“ Visual模式粘贴此代码。

保存后,它将开始工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM