Events from Data Thistle

Widgets are an easy way for you to put event listings from Data Thistle on your website.

To add a widget to your site, look for the embed these events links at the bottom of events searches and individual venue pages on Data Thistle. Following these links will take you to a preview page where you can adjust the height and width of the widget to fit your site.

You’ll then be given a small snippet of HTML to copy and paste into your web page.

If you have more specific data needs, please get in touch to discuss options (including our API).


Date selection

You can constrain the period in which the events within your widget take place by using the 'choose dates' option when searching.

Rather than use a specific date selection, it's possible to enter time frames into the 'when' field. These allow the widget to continually update with future events. Some examples:

  • "this weekend"
  • "the next 7 days"
  • "the next 2 weeks"
  • "the next 6 weeks"
  • "next month"
  • "Saturday"

Design changes and overriding the CSS

If you are familiar with CSS and wish to alter the look if the widget, you can override the styles within the widgets stylesheet.

A simple example of this, such as changing the link colour, could be achieved by adding the following CSS to your web page or stylesheet.

<style type="text/css" media="screen">
  html body .DTWidget a {color: red !important};

In this example you'll notice that we've added 'html' and 'body' selectors to the style rule in order to increase the specificity. You may wish to look at the widgets stylesheet if you are wanting to make more substantial changes.

Known issues

When pasting widget code into a blog you must ensure you that are editing your blog post in HTML mode.

WordPress automatically removes <script> tags from blog posts. This prevents widgets from running. See WordPress support for more details.