Forums

Differ style per widget (4 posts)

  1. wzshop
    Member
    Posted 6 months ago #

    Hello,
    I was wondering if it is possible to change the style of a single widget. Like this:

    widget 1: style 1

    widget 2: style 2

    widget 3: style 1

    widget 4: style 2

    and so on... any possibility to implement such a thing?
    Thank you sooo much!

  2. alchymyth
    The Sweeper
    Posted 6 months ago #

    possible - depending on the way you used 'register_sidebar()' in functions.php:
    http://codex.wordpress.org/Function_Reference/register_sidebar

    in this line:

    'before_widget' => '<li id="%1$s" class="widget %2$s">',

    the %1$s and %2$s will output widget specific css ids or classes

  3. wzshop
    Member
    Posted 6 months ago #

    hi,
    thanks for your quick response. I am aware of that, but there is no way to automate this? since it is not possible to predefine all the id's and classes in the css. Especially because i don;t know the specific order the widgets will be presented..

    thanks again.

  4. alchymyth
    The Sweeper
    Posted 5 months ago #

Reply

You must log in to post.

About this Topic