• Resolved JohnnyDMonic

    (@johnnydmonic)


    Hi there, hopefully someone can help me out…

    I am having a problem working out the best way of overriding the code for the events list widget.

    I found this forum post: http://wordpress.org/support/topic/plugin-the-events-calendar-widgets-events-list-display but I don’t appear to have the file events-list-load-widget-display.php on my computer. Maybe this relates to an earlier version?

    What I want to do is to make it display upcoming events in exactly the same style as the Recent posts widget. So I need to change the following things:

    Change from using an ordered list to an unordered list.
    Remove any css classes and IDs relating to “tribe-events-“.
    Remove the “View all events” link.

    If anyone could point me in the right direction I’d be extremely grateful.

    Thanks,

    John.

    http://wordpress.org/plugins/the-events-calendar/

Viewing 5 replies - 1 through 5 (of 5 total)
  • That does indeed relate to an earlier incarnation of the plugin. Check out our updated Themer’s Guide to look over the current structure:

    http://tri.be/support/documentation/events-calendar-themers-guide/

    Thread Starter JohnnyDMonic

    (@johnnydmonic)

    Thanks for the reply.

    I did have a look at that page, but all I could learn from it was that I could override list-widget.php, but that only contains the code for a single list item in the widget. What I need to do is override the entire widget.

    I ended up modifying widget-list.class.php to make the changes I needed. I know this is bad practice but I couldn’t work out another way.

    I would be very grateful if someone could describe the correct way of doing this within my child theme.

    I ended up modifying widget-list.class.php to make the changes I needed. I know this is bad practice but I couldn’t work out another way.

    Modifying core plugin code is indeed a bad practice, really though if you need to adjust things to the point that this is necessary it may be better to create a new widget of your own (which, of course, could simply inherit much of the existing widget’s code).

    That would be a safer and more upgrade resistant way of doing things in this scenario.

    I’m having this same issue (I haven’t modified the core code yet). Why does this widget display as an item in an ordered list, instead of an unordered list? I’ve worked around it through CSS, but it’s not ideal.

    Hi marcelle42, it’s generally best to post a new thread of your own if you need help (as per the forum welcome).

    Why does this widget display as an item in an ordered list, instead of an unordered list?

    The list items are ordered, they are not unordered, so that seemed like an appropriate choice – but we’re definitely open to suggestions if you feel strongly it should be an unordered list (please do explain the reasoning though).

    For anything else we would be happy to help you in a new thread 🙂

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

The topic ‘Overriding events widget’ is closed to new replies.