2017-09-07 43 views
1

我們知道,在WordPress主題,我們經常提供主題選項那裏誰不知道編碼是門外漢也可以使字體樣式的變化,顏色等通過PHP文件進行渲染CSS

所以當我們生成用戶在一個PHP文件中生成的CSS如何在實時網站中實現。在CSS-的functions.php→

function selected_typography() { 
$output=''; 
$h1typography = of_get_option('h1typography'); 
$h2typography = of_get_option('h2typography'); 
$h3typography = of_get_option('h3typography'); 
$h4typography = of_get_option('h4typography'); 
$h5typography = of_get_option('h5typography'); 
$h6typography = of_get_option('h6typography'); 


if ($h1typography) { 
    $output.='h1{ 
     font-family:'.tmarketo_charito_load_google_font_styles($h1typography['face']).'; 
     font-size:'.$h1typography['size'].'; 
     font-weight:'.$h1typography['style'].'; 
     color:'.$h1typography['color'].'; 
    } 
    h1 a{ 
     font-family:'.tmarketo_charito_load_google_font_styles($h1typography['face']).'; 
     font-size:'.$h1typography['size'].'; 
     font-weight:'.$h1typography['style'].'; 
    }'; 
} 

if ($h2typography) { 
    $output.='h2{ 
     font-family:'.tmarketo_charito_load_google_font_styles($h2typography['face']).'; 
     font-size:'.$h2typography['size'].'; 
     font-weight:'.$h2typography['style'].'; 
     color:'.$h2typography['color'].'; 
     }'; 
    } 
    return $output; 
} 

但上面的CSS

代碼是沒有得到實際網站上實現。這意味着h2和h1不會有任何變化。任何建議或修復?

更多信息→

我購買了premium theme→他們也在做這樣→https://www.screencast.com/t/GBvrEvqG98和它的作品一樣,其主題的魅力。

+0

你把它放在'