duannai5879 2016-03-04 14:35
浏览 29
已采纳

页面加载黄色屏幕

I am developing a Wordpress website. Everything is going according to the plan except that I started to get a yellow screen while the page is loading after I made some changes on the single.php and inserted some HTML and JS on the first line.

This does not affect the site in any other way then it's not that pretty to see. Presumably that yellow loading screen is a result of my changes on the single.php. Why is this happening and how could I restore a normal white screen? I attach a screenshot of the "bug" while the page is loading so you can see the issue.

Let me know if you want to see the code (I don't know if it is relevant). This issue happens only when I want to visit a page that uses single.php.

UPDATE:

This is the code I added:

<div class="row-fluid IFKbanner_events"> <!-- IFKbanner_events is a styling class that can vary from page to page. Do not mind it if ot does not exist or has other names on other pages -->
    <!-- Top bar -->
<div id="superettan-topbar"></div>
<script type="text/javascript">
       var teamId, offset, topbarDiv = "superettan-topbar";
       teamId = 9604;
       (function () {
           var sup1 = document.createElement('script'); sup1.type = 'text/javascript'; sup1.async = true;
           sup1.src = 'http://topbar.superettan.se/?teamId=' + teamId + '&offset=' + offset;
           (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(sup1);
       })();
   </script>
    <img src="http://website.se/nywebbsida_test/wp-content/uploads/2013/07/header1920x283.jpg" alt="">
</div>

enter image description here

  • 写回答

1条回答 默认 最新

  • duanhuan2301 2016-03-04 14:58
    关注

    Since you what those divs and js code on single pages at the top, you should edit header.php like so. Place this where you need to be. This should resolve your issue.

    <?php if(is_single()){
           //add the code here
          }
    ?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看