开发者

Wordpress dynamic sidebar widget title customization

开发者 https://www.devze.com 2023-02-02 03:51 出处:网络
I want to customize the h3.widget-title to something like this \"<span color=\"black\"> This is a </span><span color=\"white\">widget title </a>

I want to customize the h3.widget-title to something like this "<span color="black"> This is a </span><span color="white">widget title </a>

So that it will display out in different color. I tried to look into functions.php, widgets.php, but I can't figure out where is the file that print out the dynamic_sidebar('primary-widget-area'). I found the "<ul> <li>" in themesfolder/functions.php but it didn't print out the widget title.

I only need to do th开发者_StackOverflow中文版is for primary widget. Where do I find the code that prints out the primary sidebar items and title? Thank you


open up the twentyten themes function.php file in your text editor do a ctrl+f to search for "primary-widget-area" within this section is the

'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',

then simply add your code within that h3 tag..ie:

'before_title' => '<h3 class="widget-title"><span color="black">This is a</span>',
'after_title' => '<span color="white">widget title </span></h3>',

save and close then upload you should see the changes after you refresh. hope that helps you somewhat..


This all depends on the theme it is and how it was coded. At minimum you will need to provide the theme name with a link to a public download so we can see the code.

0

精彩评论

暂无评论...
验证码 换一张
取 消