【问题标题】:Embedding an iframe in Wordpress does not work在 Wordpress 中嵌入 iframe 不起作用
【发布时间】:2015-09-06 05:55:19
【问题描述】:

我需要在自托管的 Wordpress 安装中嵌入以下代码 -

<iframe id="slydy" 
    style = "border: none; max-width: 100%; min-width: 100px;" 
    src = "http://slydy.co/users/TCC/01" 
    width = "648" 
    height = "435" 
    frameborder = "0" 
    marginwidth = "0" 
    marginheight = "0" 
    scrolling = "no" 
    allowfullscreen = "allowfullscreen"> 
</iframe>

但它只是没有显示出来。我已经在至少两个其他 Wordpress 博客上安装了相同的内容,并且效果很好。

我需要调整什么设置?

【问题讨论】:

    标签: html wordpress iframe


    【解决方案1】:

    Wordpress 编辑器阻止/删除 iframe。尝试使用一些支持 iframe 的插件,例如制作一个 Shortcode 来制作 iframe。

    【讨论】:

    • 这可能不再正确,和/或取决于您在 WordPress 中放置 iFrame 代码的位置。例如,在 WordPress 5 的编辑器/自定义 HTML 块中,iframe 渲染得很好。
    【解决方案2】:

    可能是其中之一:

    1. 如果您的网站是 httpS,那么它会被阻止,因为您的 iframe 是 http。
    2. 确保您在帖子编辑屏幕上处于文本(非视觉)编辑模式
    3. WP 缓存?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-07-25
    • 1970-01-01
    • 2017-04-15
    • 1970-01-01
    • 2020-10-04
    • 1970-01-01
    • 2015-05-16
    相关资源
    最近更新 更多