Blog

How to add and EventKeeper RSS feed to a WordPress Sidebar

To the right of this post you’ll see an example EventKeeper rss feed. This feed is being displayed using a text widget in WordPress.  There are two steps to setting up this list, first create the rss feed in EventKeeper.  Second, add the feed to WordPress using a sidebar widget.

Here’s how to make an RSS feed in EventKeeper:

1.  Login as an ADMIN to your EventKeeper page and go to the ADMIN PAGE.

2. On the EventKeeper ADMIN PAGE, click CREATE in the Multipublishing section to create a new RSS feed.  Name is something like WORDPRESS so you can identify it later.

3. Once you have finished adding in the parameters for you feed, click on the Create XML file to be used as the RSS feed button.  This will create a link that looks similar to the one below.  This link is the one you will add into WordPress.

http://www.eventkeeper.com/ekfeed/[YOUR ORG CODE]_wordpress.xml

For more detailed instructions on how to make an RSS feed, please see this link in AnswerKeeper

How to add your RSS feed to WordPress using an RSS widget

In your WordPress Dashboard, go to Appearance=>Widgets. Add an rss widget to your sidebar.  Here you can give it a title and pick a location on your page for it.  Save and you are done.

Special notes

You can set the refresh rate for your feed in EK and also manually refresh the feed.  This applies to all feeds on the Plymouth Rocket server.  For those updates to be reflected in WordPress, you will need to refresh WordPress as well.

Please contact us with any questions.  We are happy to help!

 

How to Add an EventKeeper Feed Using a Sidebar Widget

To the right you’ll see an example EventKeeper feed. This feed is being displayed using Javascript and a text widget.

Here’s how to do it:

Login as an ADMIN to your EventKeeper page and go to the ADMIN PAGE.

On the EventKeeper ADMIN PAGE, click CREATE in the Multipublishing section to create a new EKFeed.

Here are the parameters used to build this example feed. Note that we are using an ARRAY VARIABLE:

EK_feedmaker_example1

Click CREATE SAMPLE DISPLAY
Click CREATE THE JAVASCRIPT SNIPPET AND SAMPLE FILE
You will see the link to copy and paste into the HTML of your page. It looks like this, where YOUR_FEED_NAME is the name you gave your feed:
http://www.eventkeeper.com/ekfeed/YOUR_FEED_NAME.js

Your Web Developer must use javascript to format and display the event data. If you do not have a Web Developer, you can use our example code below as a starting point. This is provided simply for illustrative purposes. Insert your feed name for YOUR_FEED_NAME and your organization’s code for YOUR_ORGCODE.

In your WordPress Dashboard, go to Appearance=>Widgets. Add a text widget to your sidebar and insert your code.

http://www.eventkeeper.com/ekfeed/YOUR_FEED_NAME.js

// new variable to handle long event names
var maxNameLength = 50;

// EventKeeper first returns a javascript variable called fString for FeedString
// which tells us what varibles are returned.
// characters in the string can be:
// D : date
// T : time
// N : name
// 1 : keyword 1
// 2 : keyword 2

// EventKeeper has created an javascript array variable called evtArray
// with fields = evt_date, evt_time, evt_name, evt_ID, evt_Key1 and evtKey2

// for this example we write out the data from this array in a table.

// outer table
document.write(”

“);

document.write(”

“);

// inner table with event data
document.write(”

“);

// loop through the array, creating a table row for each row in the array.
for (i=0; i”);

// for demonstration purposes, we check FeedString.
// Since you know what data you’ve asked for you can hard code the array.
if (FeedString.indexOf(“D”) != -1)
document.write(”

” + evtArray[i][evt_date] + ”

“);

if (FeedString.indexOf(“P”) != -1)
document.write(”

” + evtArray[i][evt_date] + ”

“);

if (FeedString.indexOf(“N”) != -1)
{
{
// handle long event names
var theName = evtArray[i][evt_name];
if (theName.length > maxNameLength)
theName = theName.substring(0,maxNameLength-2) + ‘…’;

// create the hyperlink based on the Event Name and the Event ID

var linkurl = ‘http://www.eventkeeper.com/code/events.cfm?curOrg=YOUR_ORGCODE’;

linkurl += “#” + evtArray[i][evt_id];
var namelink = ‘‘ + theName + ‘‘;
document.write(”

” + namelink + ”

“);
}
}

if (FeedString.indexOf(“1?) != -1)
document.write(”

” + evtArray[i][evt_key1] + ”

“);

if (FeedString.indexOf(“2?) != -1)
document.write(”

” + evtArray[i][evt_key2] + ”

“);

document.write(”

 

“);
}
document.write(”

“);

// if you would be so kind, please include a reference to EventKeeper
var EKNOTICE = ‘Powered by‘;
EKNOTICE += ‘ EventKeeper‘;
document.write(“
” + EKNOTICE + ”

“);

// close the table tag
document.write(”

“);