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

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

报告相同问题?

悬赏问题

  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了