drvjlec1767 2016-06-27 09:26
浏览 29
已采纳

谷歌地图<iframe>代码无法从wp文本编辑器正确显示

I face very weird issue. I get the iframe code from google maps and write it into WordPress editor and when I save it and refresh my page it shows me iframe code as it is.

My iframe code

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d27095.10477927874!2d115.7941040874009!3d-31.90963766909216!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x2a32ae630473e2ad%3A0x1c04f0b88014a3f0!2sHerdsman+WA+6017%2C+Australia!5e0!3m2!1sen!2s!4v1467018866612" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

I show it from my contact page, so in page.php I write simple loop

if(have_posts()) {
   while(have_posts()) {
      the_post();

      the_content();
   }
}

I also change the_content() to get_the_content() but nothing happened.

Is some one know what is the issue, why its shows me <iframe> code as it is

  • 写回答

1条回答 默认 最新

  • dpw30157 2016-06-27 10:03
    关注

    You need to add iframe code in to text editor rather then visual editor, try

    enter image description here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度