Skip to content

How to embed the UT events calendar feed on your website

This is a simple 2 step process.

Step 1

Copy the following code and paste into the <head> of your html document.

 <script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAAPrxZwyLH1quGPzcQTSnt2xRO9V8f_wvZ8Pu_Kp1GhO5Ipa7J1hQqfY_snZQNW_9WZZCcW6D_cJ_fSw"></script>
    <script type="text/javascript">

    google.load("feeds", "1");

     function OnLoad() {
      var feed = new google.feeds.Feed("http://www.utk.edu/events/rss/feed.php?l=1");
      feed.setNumEntries(10);

       feed.load(function(result) {
        if (!result.error) {
          var container = document.getElementById("feed");
          for (var i = 0; i < result.feed.entries.length; i++) {
            var entry = result.feed.entries[i];
            var li = document.createElement("li");
            var a = document.createElement("a");
            var url = entry.link;
            a.appendChild(document.createTextNode(entry.title));
            a.setAttribute('href', url);
            container.appendChild(li);
            li.appendChild(a);
          }
        }
      });

    }
    google.setOnLoadCallback(OnLoad);
    </script>

Step 2

Add the following code where you want your events calendar feed to appear.

<h2>Upcoming Events</h2>
    <ul id="feed"></ul>

All done!

The UT events calendar feed is now embedded in your website and will display 10 upcoming events (we recommend not to display more than 10 events).

Get Creative


If you’d like to show a custom event calendar feed
, create your custom feed and then replace your custom feed URL with the feed URL shown in Step 1:

http://www.utk.edu/events/rss/feed.php?l=1

If you’d like to adjust the number of events displayed, change

feed.setNumEntries(10);

to any number you want.
For example,

feed.setNumEntries(5);

If you have any questions about embedding the UT events calendar RSS feed, please email webteam@utk.edu.

The flagship campus of the University of Tennessee System and partner in the Tennessee Transfer Pathway.