2016-02-16 25 views
0

我遇到了Fontello的問題 - everythink正在本地主機上工作,但是當我上傳主題(基於下劃線創建)它不工作(實際上它工作主頁 - 設置爲WordPress的開始 - 機器人不在其他人)。fontello不工作在WordPress的下劃線主題

您可以在我的測試域webblaster.pl上查看它。

主頁是確定 - 在左邊底部有固定「社會化媒體」欄 - 尚未風格 - 這就是爲什麼它看起來這麼難看:)

但在->fotografia-home -> kontakt的底部,你可以看到一些無法正常加載字體。

在頭節,我安裝使用一個CSS文件:

<link href="<?php bloginfo('stylesheet_directory'); ?>/fonts/fontello/css/fontello.css" rel="stylesheet" type="text/css"> 

我不知道什麼是錯的 - 試圖改變目錄,但沒有奏效。

我會感謝所有幫助:)

回答

0

這似乎是一些你的CSS規則將覆蓋對方的情況。

/wp-content/themes/paulinakozan/fonts/fontello/css/fontello.css有個規則:

[class^="icon-"]::before, [class*=" icon-"]::before { 
    display: inline-block; 
    font-family: "fontello"; // <-- IMPORTANT LINE! 
    font-style: normal; 
    font-variant: normal; 
    font-weight: normal; 
    line-height: 1em; 
    margin-left: 0.2em; 
    margin-right: 0.2em; 
    text-align: center; 
    text-decoration: inherit; 
    text-transform: none; 
    width: 1em; 
} 

但另一個CSS是由您的網站加載:/wp-content/plugins/modula-best-grid-gallery/scripts/modula.css?ver=4.4.2還有另外一個規則:

[class^="icon-"]::before, [class*=" icon-"]::before { 
    font-family: "modula-icons" !important; // <-- ANOTHER IMPORTANT LINE! 
    font-style: normal !important; 
    font-variant: normal !important; 
    font-weight: normal !important; 
    line-height: 1; 
    text-transform: none !important; 
} 

第二FONT-FAMILY定義modula-icons定義!!重要,所以它贏得了對fontello! 這就是爲什麼你的圖標加載不正確的原因。這些圖標根本不存在於模塊圖標中。

如果我在Chrome中打開您的網站並在開發人員工具欄中禁用modula-icons規則,社交圖標顯示正確。

enter image description here

+0

非常感謝你的幫助:) 對不起,這些瑣碎的問題。我應該自己檢查一下 –