I use WordPress and have a sidebar containing widgets, run by this code:
<div class="sidebar modern">
<?php if ( is_active_sidebar( 'sidebar-modern' )) : ?>
<ul>
<?php dynamic_sidebar( 'sidebar-modern' ); ?>
</ul>
<?php else : ?>
<?php endif; ?>
</div>
What I do in wp-admin
- I add the archive widget
- I set display as a select-list (dropdown) in widget options
What I need is to add a container HTML class to the select.
I have tried these and failed:
- CSS (because it’s a design thing)
- Filter – widget_archives_dropdown_args
- Filter – wp_get_archives filter
If it’s possible to add a container class to all the widget inside (widget title not included), it would be fine by me.
It’s not possible right now without editing the WordPress core.