Custom title and background title for widget
-
I developed a widget and the widget looks exactly like the other widgets in the website, so it inherits style, etc.
Problem is, this particular widget needs a little edit: I should change the color of the title and of the title background.
At the moment, I print the title this way:
if (!empty($title)) { echo $args['before_title'] . $title . $args['after_title']; }
I suppose (not tried) that
$args['before_title']
and$args['after_title']
are responsible for generating this HTML:<div class="widget-main-title"> <h4 class="widget-title"> (TITLE) </h4> </div>
Now, if so, I could simply echo e new version of this HTML and reference other custom CSS classes.
But is this brutal way the way to go or is there something neater I could do?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom title and background title for widget’ is closed to new replies.