I am trying to tailor the widget used in the Events Manager plugin so that it has a similar styling to the ThemeLoom – Show Events widget. I thought that wrapping the code that “echoes” events with id=”los-events” and class=”content-box” would do the trick.
// Wrap in content-box from Living_OS Xi theme
echo '<div id="los-event" class="content-box" >';
echo '<u class="los_events"l>';
// echo events with <li></li> tags
But alas, no dice. No errors when I “Inspect Element” in Chrome Developer.
I got this to work and wanted to pass along a solution in case anyone else tries it. I had to create a CSS file that includes the content-box styling. I then “enqueued” the CSS file in the function that lists the events:
wp_enqueue_style('content-box' , get_template_directory_uri() . '../ChildTheme/content-box.css'); //css for the content box
I wanted to improve this answer some. I found it preferable to keep the new CSS file in my child theme directory. I could have also added this CSS code to my child theme style.css file. But nonetheless, to get the child theme URI and not the parent theme URI you need to use ‘get_stylesheet_directory_uri’
wp_enqueue_style('content-box', get_stylesheet_directory_uri() . '/content-box.css'); //css for the content box