我使用redux框架構建了wordpress主題選項頁面。我在我的style.php文件中讀取了數據,我將這個文件包含在de頭文件中,以便自定義css被加載。用php文件生成css文件
style.php:
<?php
?>
body {
background-color:<?php global $variable; echo $variable['color-background'];?>;
font-family:<?php global $variable; echo $variable['typography6']['font-family'];?>;
}
a {
color: <?php global $variable; echo $variable['link-color']['regular'];?>;
}
<?php
?>
的header.php:
<style>
<?php require_once('css/style.php');?>
</style>
現在一切都亂在我的網站的負責人。如果它自動生成一個css文件會很好。有誰知道一個好的選擇?
[我怎麼能在我的樣式表使用WordPress的功能呢?(http://wordpress.stackexchange.com/q/54583) – brasofilo