1
我一直在閱讀上在這個例子中添加自定義背景選項,像WordPress的抄本WordPress的開發者自定義背景選項
$defaults = array(
'default-color' => '',
'default-image' => '',
'default-repeat' => '',
'default-position-x' => '',
'default-attachment' => '',
'wp-head-callback' => '_custom_background_cb',
'admin-head-callback' => '',
'admin-preview-callback' => ''
);
add_theme_support('custom-background', $defaults);
生成的輸出,那麼看起來就像這樣:
<style type="text/css" id="custom-background-css">
body.custom-background { background-color: #bdd96e; }
</style>
這是行不通的,因爲我的主題很複雜,我需要能夠更改上面的代碼片段,以便它w虐待覆蓋.menu包裝標籤的默認背景,是否有一種方法,我可以更改默認的CSS選擇器,以目標不同的標籤,而不是正文?
謝謝,這幫了很多! C: – colbyn