admin管理员组文章数量:1323225
I've set the Link color using the color picker in the front end. I want to use this color for buttons on the site so I used the following code in header.php
<style>
.btn{
background-color: <?php echo get_theme_mod( 'link_color' ); ?>;
}
</style>
It worked and I could see the buttons change color to whatever I picked for Link Color
setting.
But it shows up only in Customization window. When I hit Publish and reload the site, I see the function is not returning any value.
<style>
.btn{
background-color: ;
}
</style>
This is what I see when I inspect element.
Also, I've used
.site,body{
background-color: #<?php echo get_theme_mod('background_color'); ?>!important;
}
in header.php
and it loads the color properly. I can used background_color
, page_background_color
, secondary_text_color
with get_theme_mod
and also get_option
functions but not link_color
or main_text_color
.
How do I retrieve Link Color
?
本文标签: phpretrieve quotLink Colorquot value
版权声明:本文标题:php - retrieve "Link Color" value 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742073851a2419288.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论