admin管理员组文章数量:1130349
I read the previous ask about this. And tried renaming my scheme to "default" and it didn't work.
I am implementing the child theme on 50+ blogs on a network and I would like to just click "Activate" rather than also choose the color scheme. Any help would be great. This is what I have in my child theme's functions.php file.
add_filter('twentyfifteen_color_schemes', 'my_custom_color_schemes');
function my_custom_color_schemes( $schemes ) {
$schemes['custom'] = array(
'label' => __( 'My Custom Colors', 'twentyfifteen' ),
'colors' => array(
'#f8f7f4',
'#002244',
'#f8f7f4',
'#585552',
'#ffffff',
'#f8f7f4',
),
);
return $schemes;
}
I read the previous ask about this. And tried renaming my scheme to "default" and it didn't work.
I am implementing the child theme on 50+ blogs on a network and I would like to just click "Activate" rather than also choose the color scheme. Any help would be great. This is what I have in my child theme's functions.php file.
add_filter('twentyfifteen_color_schemes', 'my_custom_color_schemes');
function my_custom_color_schemes( $schemes ) {
$schemes['custom'] = array(
'label' => __( 'My Custom Colors', 'twentyfifteen' ),
'colors' => array(
'#f8f7f4',
'#002244',
'#f8f7f4',
'#585552',
'#ffffff',
'#f8f7f4',
),
);
return $schemes;
}
Share
Improve this question
asked Nov 6, 2018 at 19:30
whakawaeherewhakawaehere
7910 bronze badges
1 Answer
Reset to default 0Adding 'default' should work. Did you try calling the colors and seeing if your filter is working?
If it's not you could try adding a higher priority to your filter
add_filter( 'twentyfifteen_color_schemes', 'my_custom_color_schemes', 99 );
function my_custom_color_schemes( $schemes ) {
$schemes['default'] = array(
'label' => __( 'my new default color', 'twentyfifteen' ),
'colors' => array(
'#f8f7f4',
'#002244',
'#f8f7f4',
'#585552',
'#ffffff',
'#f8f7f4',
),
);
return $schemes;
}
I read the previous ask about this. And tried renaming my scheme to "default" and it didn't work.
I am implementing the child theme on 50+ blogs on a network and I would like to just click "Activate" rather than also choose the color scheme. Any help would be great. This is what I have in my child theme's functions.php file.
add_filter('twentyfifteen_color_schemes', 'my_custom_color_schemes');
function my_custom_color_schemes( $schemes ) {
$schemes['custom'] = array(
'label' => __( 'My Custom Colors', 'twentyfifteen' ),
'colors' => array(
'#f8f7f4',
'#002244',
'#f8f7f4',
'#585552',
'#ffffff',
'#f8f7f4',
),
);
return $schemes;
}
I read the previous ask about this. And tried renaming my scheme to "default" and it didn't work.
I am implementing the child theme on 50+ blogs on a network and I would like to just click "Activate" rather than also choose the color scheme. Any help would be great. This is what I have in my child theme's functions.php file.
add_filter('twentyfifteen_color_schemes', 'my_custom_color_schemes');
function my_custom_color_schemes( $schemes ) {
$schemes['custom'] = array(
'label' => __( 'My Custom Colors', 'twentyfifteen' ),
'colors' => array(
'#f8f7f4',
'#002244',
'#f8f7f4',
'#585552',
'#ffffff',
'#f8f7f4',
),
);
return $schemes;
}
Share
Improve this question
asked Nov 6, 2018 at 19:30
whakawaeherewhakawaehere
7910 bronze badges
1 Answer
Reset to default 0Adding 'default' should work. Did you try calling the colors and seeing if your filter is working?
If it's not you could try adding a higher priority to your filter
add_filter( 'twentyfifteen_color_schemes', 'my_custom_color_schemes', 99 );
function my_custom_color_schemes( $schemes ) {
$schemes['default'] = array(
'label' => __( 'my new default color', 'twentyfifteen' ),
'colors' => array(
'#f8f7f4',
'#002244',
'#f8f7f4',
'#585552',
'#ffffff',
'#f8f7f4',
),
);
return $schemes;
}
本文标签: functionsChange default color scheme in twentyfifteen child theme
版权声明:本文标题:functions - Change default color scheme in twentyfifteen child theme? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749201758a2331920.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论