WordPress.org

Support

Support » Themes and Templates » [Resolved] Styling just category widget

[Resolved] Styling just category widget

  • nemci7v

    @nemci7v

    Is it possible to have particular style for the default category widget? I checked the source and all the widgets are wrapped in <div id="widgit-sidebar" class="widgit-area">

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    @esmi

    Forum Moderator

    You’d need to change the generated widget markup created by register_sidebar in functions.php from:

    'before_widget' => '<div id="widget_sidebar" class="widget-area">',

    to something like:

    'before_widget' => '<div id="widget_sidebar" class="widget-area %2$s">',

    In theory, this would add a class ‘widget_text’ to the output that you could then use in your CSS.

    nemci7v

    @nemci7v

    Esmi that theory totally works! Thanks!

    esmi

    @esmi

    Forum Moderator

    You’re welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Styling just category widget’ is closed to new replies.
Skip to toolbar