Support » Themes and Templates » Advanced! Css for built-in widgets

  • Resolved Cathy Tibbles

    (@multitalentedmommy)


    From pagesource, I can see that there are several classes the wp has assigned to the in-house widgets. But where do I find the list of them?

    for example: class=”widget widget_pages”
    & h2 class=”widgettitle”

    Anyone know? They are NOT in the default or classic themes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Cathy Tibbles

    (@multitalentedmommy)

    anyone?

    sorry, i have no idea where to find them…your question is too advanced for me =] i’m still trying to sort out my annoying ie sidebar problem =/

    From pagesource, I can see that there are several classes the wp has assigned to the in-house widgets. But where do I find the list of them?

    for example: class=”widget widget_pages”
    & h2 class=”widgettitle”

    Anyone know? They are NOT in the default or classic themes.

    That’s because they individual widget class names are defined in the core WordPress files (the widgets.php file in the wp-includes folder).

    If you want a list of those, take a look at this screenshot attachment in Trac. Ignore the one with the “-alt” ending and just drop the “.gif” from the file names and you have all the widget classnames.

    Technical note: The generic “widget” and “widgettitle” class names can be customized. From the first few lines of the default theme’s functions.php file:

    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));

    For more information, see Widgetizing Themes at the automattic.com website.

    Cathy Tibbles

    (@multitalentedmommy)

    thank you! that’s perfect. (I’m assuming that the -alt would be similar to the alternating classes assigned to comments?) I can’t follow all that stuff on automatic. I’m really not sure its English. 🙂

    I’m not understanding why this isn’t requested more often – maybe put in the codex somewhere? There have GOT to be other theme authors that want to match up the widgets so users can customize their own sidebars. There are some of us who are not up to writing widgets but can muster up the guts to change the css.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Advanced! Css for built-in widgets’ is closed to new replies.