WordPress dynamic sidebar widget title customization

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.

Read More

I only need to do this for primary widget. Where do I find the code that prints out the primary sidebar items and title?
Thank you

Related posts

Leave a Reply

2 comments

  1. 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..

  2. 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.