Event Organiser
Using templates with the Events widget (6 posts)

  1. John Sundberg
    Posted 3 years ago #

    Stephen, thanks for your work on this plugin - I'm really liking it so far.

    I've figured out how to use page templates with different themes, but I don't get how to make and use a template for the Events widget. Can you give some direction on how to do this?



  2. Anonymous
    Posted 3 years ago #

    Hi John,
    The 'template' for widgets (different from page templates) was originally only available to the event list shortcode. The documentation for the template can be found on the page for the event list shortcode.

    Hope that helps :)

  3. John Sundberg
    Posted 3 years ago #

    So the text box titled "Template (leave blank for default)" in the Events widget is actually for template tags and not the name of a template file?

  4. Anonymous
    Posted 3 years ago #

    That's right yes. Sorry for any confusion. I need to provide an explanation since it's unclear what is being asked for or where the template tags can be found.

  5. John Sundberg
    Posted 3 years ago #

    Finally getting back to this and now I understand how the templating works in the Events List widget. :)

    So a new question is can I use a conditional of some sort in the template? For example, if an event is all day it will say, "All day" rather than list the start and end times.

    I've tried a couple ways but haven't found a solution yet.

  6. Anonymous
    Posted 3 years ago #

    Unfortunately conditional statements aren't yet supported for the widget template field. The closest to such as thing is


    The second argument is ignored for 'all day' events. So you can just display the time for non-all-day events. Unfortunately, this doesn't allow you to add 'all day' to the appropriate events.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Event Organiser
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic