如何使用仪表板在wordpress中插入iframe

时间:2016-11-14 12:10:53

标签: javascript php html wordpress iframe

我想在 wordpress 网站中插入 iframe

然而我无法这样做。

这是我的代码:



<iframe id="eventListIframe" src="http://www.example.com/widgets/eventList_.php?id=781ea4dab64042de4fbdc6d9102ef0e7" frameborder="0" scrolling="no" style="width:100%;" ></iframe><script type="text/javascript" src="http://www.example.com/widgets/iframeResizer.min.js"></script><script type="text/javascript">iFrameResize({log:false,enablePublicMethods:true});</script>
&#13;
&#13;
&#13;

当我在我的网站上查看时,我得到 iFrameResize({log:false,enablePublicMethods:true}); 文本作为输出。

1 个答案:

答案 0 :(得分:2)

要在第二个网页(组织网站)中嵌入一个网页(数据可视化),我们使用一个简单的HTML代码,称为 iframe

由于安全原因,WordPress会删除iframe html标记。 iframe短代码是iframe html标签的替代品,并接受与iframe html标签相同的参数。您可以使用iframe短代码嵌入来自YouTube,Vimeo,Google地图或任何外部网页的内容。

https://wordpress.org/plugins/iframe/

如果您想通过其他方式 - 代码

https://wordpress.stackexchange.com/questions/20202/embed-iframe-or-html-page-into-dashboard-widget