2016-03-04 52 views
0

我正在開發一個Wordpress網站。一切都按照計劃進行,除了我在single.php上做了一些更改並在第一行插入了一些HTML和JS之後,在頁面加載時開始出現黃色屏幕。頁面加載時的黃色屏幕

這不會以任何其他方式影響網站,那麼看起來並不漂亮。據推測,這個黃色的加載屏幕是我對single.php進行更改的結果。爲什麼會發生這種情況,我怎樣才能恢復正常的白屏?當頁面加載時,我附上了一個「bug」的截圖,以便您看到問題。

讓我知道你是否想看代碼(我不知道它是否相關)。只有當我想訪問使用single.php的頁面時,纔會發生此問題。

UPDATE:

這是我添加的代碼:

<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

+2

真的,黃頁標籤? – WheatBeak

+1

看到代碼可能會有用。 – CiprianD

+0

黃色頁面消失了。我沒有想到它與公司有關,但與一些其他用戶有關聯的問題 – viriato

回答

1

既然你什麼在頂部單頁這些div和js代碼,你應該修改標題.php像這樣。把它放在你需要的地方。這應該可以解決您的問題。

<?php if(is_single()){ 
     //add the code here 
     } 
?> 
+0

這解決了問題!我想錯了。感謝您的領導! :) – viriato