Dynamic class for widget element
-
Hi,
I don’t know the best way to explain this, so I will try my best.
Usually we register a sidebar with a code like this
register_sidebar( array( 'name' => 'Secondary Widget Area', 'id'=> 'secundary_sidebar', 'before_widget' => '<div class="widget">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>', ) );
And when we use it, it will generate this HTML:
<div class="widget"> <h3 class="widgettitle"> ......
So, my question is. How can I generate automatically a specific class name in my widget?
The reason is for me to be able to style my widgets easily.
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Dynamic class for widget element’ is closed to new replies.