Title: adding widget code in widget title
Last modified: August 19, 2016

---

# adding widget code in widget title

 *  [juukyuu](https://wordpress.org/support/users/juukyuu/)
 * (@juukyuu)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/)
 * hii.
 * i’ve been trying to figure out how to replace the individual widget title to 
   its own different “background-image” and noone seems to be really understand 
   what i was talking about. however, i found this code somewhere in the source:
 * <div id=”widget_tag_cloud” class=”widget”>
    <h4><span>tag cloud</span></h4>
 * that is the code for widget title and i’ve checked the css for it. so, i tried
   putting that code in the widget title itself on custom widgets page just to test
   it out, and it didn’t seem to work. so, the question is how do you add that code
   to the individual widget? the original code for each widget is:
 * <li id=”text-3″ class=”widget widget_text”><h2 class=”widgettitle”>widget title
   </h2>
 * except that “text-3” does actually vary because of the different widgets that
   the website has, like “text-4” or “text-9” or so on.
 * is there a php file somewhere in the theme or elsewhere that we have to modify
   in order to customize each widget title like the first sample above?
 * thank you.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123403)
 * If you want all your widget titles to be the same then you may need to look in
   your functions.php file for the widget declarations.
 * I would expect to see something similar to this in the file:
 *     ```
       if ( function_exists('register_sidebar') )
         register_sidebars(2,array(
             'before_widget' => '<div class="widget">',
             'after_widget' => '</div><!--/widget-->',
             'before_title' => '<h2 class="widget-title">',
             'after_title' => '</h2>',
             ));
       ```
   
 * Set your ‘before_title’ and ‘after_title’ to what you want for **every** widget.
 * Hope that helps some …
 *  Thread Starter [juukyuu](https://wordpress.org/support/users/juukyuu/)
 * (@juukyuu)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123511)
 * hello, thank you for your replyyy!
 * i did not understand it, unfortunately. could you please give some full sample?
   i mean, if for one widget titled as “about us” then… what do we insert in the
   functions php widget you provided above?
 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123539)
 * Could you provide a link to your blog? I can look and see about some “samples”
   once I have a better idea of your website.
 * If you are looking for a different style for each “widget”, my above suggestion
   may not work. You will need to customize each and every “widget” you want to 
   look different than all the other widgets.
 *  Thread Starter [juukyuu](https://wordpress.org/support/users/juukyuu/)
 * (@juukyuu)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123563)
 * yes yes, no problem. note that it’s very messy right now and i have weirdest 
   comments there just to test things out. xD
 * here: [jxade.tk](http://www.jxade.tk)
 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123575)
 * Are you trying to make the “sidebar” at the bottom of your blog have the same
   arrow style background image as the “sidebar” on the right side of the blog?
 * There is a difference in how each is being displayed to the page. The bottom 
   sidebar is using:
 *     ```
       .sidebar h2 {
         ...
         width:220px;
         ...
       ```
   
 * The background image is 275px wide in the right sidebar. You can try changing
   your CSS in the style.css file inside the theme folder to “width:275px;”, although
   I cannot guarantee the overall effect on your theme it should provide the same
   background image displayed as what you see in the right sidebar. You will have
   to test to see if it affects anything else.
 *  Thread Starter [juukyuu](https://wordpress.org/support/users/juukyuu/)
 * (@juukyuu)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123580)
 * ahh, thank you. but this isn’t what i’m looking for. :[ what i’m looking for 
   is here, an example:
 * [davidhellmann.com](http://www.davidhellmann.com/)
 * you see a couple of sidebars at the bottom of the page. i’m assuming that these
   are originally widgets and he added widget title by customization.
 * “”you have to see…” and “latest articles” as widget titles.
 * these two are like under the “background image” in css for the widget title itself
   since i already checked his style css, and still couldn’t figure it out how. 
   and the question is how to do that for each of the widget with a hidden “background-
   image” like his?
 * i’m so sorry for the confusion.
 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123611)
 * I see what you are looking at in the examples at the bottom of that web site.
 * The left column appears to be a blogroll of sorts, possibly by way of plugin 
   as to the best of my knowledge the standard blogroll does not display “favicons”
   for the links. The right column is displaying most recent posts, possibly by 
   plugin or code.
 * The theme being used at this web site is much different than the theme you are
   working from … accomplishing the same may require a great deal of customization
   to the theme you have chosen to use.
 *  Thread Starter [juukyuu](https://wordpress.org/support/users/juukyuu/)
 * (@juukyuu)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123623)
 * ahh, yes. this sounds much more than a hard work which i took into a consideration
   that i don’t want to work on it anymore.
 * anyways, thank you very much for your response and time!
 *  [kimil](https://wordpress.org/support/users/kimil/)
 * (@kimil)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123697)
 *  [kimil](https://wordpress.org/support/users/kimil/)
 * (@kimil)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123698)
 * Hi juukyuu !
 * I’m trying to achieve the same things as you want and finally I’ve find this 
   link:
 * [http://www.mummey.org/2009/02/styling-wordpress-dynamic-sidebar-dynamic_sidebar_params-filter/](http://www.mummey.org/2009/02/styling-wordpress-dynamic-sidebar-dynamic_sidebar_params-filter/)
 * Look at his sidebar. He has achieved what you want by using a filter called: 
   dynamic_sidebar_params
 * But I don’t understand where to put the code in wordpress.
 * If you understand, tell me !

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘adding widget code in widget title’ is closed to new replies.

 * 10 replies
 * 3 participants
 * Last reply from: [kimil](https://wordpress.org/support/users/kimil/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/adding-widget-code-in-widget-title/#post-1123698)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
