• Hello

    I have a .css file that I wish to use for the events list widget on the sidebar. I wonder how can I do this? I’ve browsed through the directory structure to see if there’s a default one but couldn’t find it.

    The only line of code I found related to the output was
    in widgets/em-events.php . Adding any jibberish to the format key in the array does not reflect in the output btw.

    'format' => 'jibbee234 #_LINKEDNAME<ul><li>#j #M #y</li><li>#_TOWN</li></ul>',

    Sorry I’m new to this :).

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    you should either add that css file to your theme. if the css rules are right then it should just override the defaults.

    Thread Starter haydarekarrar

    (@haydarekarrar)

    The problem is what properties are there to override/declare? If there was a default one I would know, but now I can’t just guess them, right?

    Thread Starter haydarekarrar

    (@haydarekarrar)

    THis is what I found in the source, but I would prefer having a style generated for those list items.

    <li id="em_widget-3" class="widget-container widget_em_widget"><h3 class="widget-title">Events</h3><ul><li><a href='http://absoc.local/?page_id=19&event_id=1' title='Orality in James Joyce Conference'>Orality in James Joyce Conference</a><ul><li>4 Jul 11</li><li>Galway</li></ul></li><li><a href='http://my.local/?page_id=19&event_id=2' title='Traditional music session'>Traditional music session</a><ul><li>25 Jul 11</li><li>Galway</li></ul></li><li><a href='http://my.local/?page_id=19&event_id=3' title='6 Nations, Italy VS Ireland'>6 Nations, Italy VS Ireland</a><ul><li>25 Jun 18</li><li>Galway</li></ul></li></ul></li> </ul>

    Not to usurp the OP’s topic, but I too am wondering about formatting of the events list widget. I use a theme (organic non-profit), and I place the widget in the sidebar. I would like to do one minor thing (add a calendar icon to the left of the title of the Events list in the widget area that users can click on to access all events instead of showing the “view all events” text at the bottom).

    I can’t seem to find anywhere to change the output of Widget’s standard formatting with the exception of the limited display options for per-event items that you configure when you add the widget to the sidebar area.

    Where would one find the file that controls the display properties of the events list widget?

    thanks for any information.

    Nevermind, I found the area in the em-events.php file:

    /** @see WP_Widget::widget */
    function widget($args, $instance) {
    $instance = array_merge($this->defaults, $instance);
    $instance = $this->fix_scope($instance); // depcreciate
    echo $args[‘before_widget’];
    echo $args[‘before_title’];
    echo “a”; /** test **/
    echo $instance[‘title’];
    echo $args[‘after_title’];
    $instance[‘owner’] = false;

    … echo “a” testing output before the title worked. I will set this for an image tag. sorry for wasting your time.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Customise CSS for widget’ is closed to new replies.