Categories: Tips & Tricks

Use WordPress to print a RSS feed for Eventbrite attendees

Today I was working on the WordCamp.LA site. I was trying to show the “attendee list” on the attendees page with out having to update the page every day.

Since I am using EventBrite to promote and sell ticket to the event I can collect info from there list. Evey one who purchases a ticket gets put into the ticketed database which you can view with either RSS or OPML.

I chose to use RSS and the WordPress core file rss.php.

In the functions.php file I’ve added this function:

function attendee_feed_print_2009() {
 global $wpdb;
  include_once( ABSPATH . WPINC . '/rss.php' );
  $rss = fetch_rss( 'http://www.eventbrite.com/rss/event_list_attendees/384870157' );
  $items = array_slice( $rss->items, 0 );

Where I’ve named my function, and included the core RSS file from WordPress. I also told it to fetch the feed from the address (alternatively you can use any feed link you like).

if ( empty( $items ) ) echo '<ul style="list-style-type: none; list-style-image: none; list-style-position: outside;"><li>No items</li></ul>';

 else

 foreach ( $items as $item ) : ?>
 <ul style="list-style-type:none; list-style-image:none; list-style-position:outside; margin-bottom: 0px">
 <li><!--<strong><?php echo $item[ 'title' ]; //User name ?></strong><br />-->

 <?php echo $item[ 'content' ][ 'encoded' ]; ?>

 <hr style="border: 1px solid #ddd; margin-bottom: 8px" />
 </li>
 </ul>
 <?php endforeach;

I then added the core style to fit this current feed.

And the final out come looks like this:

function attendee_feed_print_2009() {
 global $wpdb;
 include_once( ABSPATH . WPINC . '/rss.php' );
 $rss = fetch_rss( 'http://www.eventbrite.com/rss/event_list_attendees/384870157' );
 $items = array_slice( $rss->items, 0 );
 if ( empty( $items ) ) echo '<ul style="list-style-type: none; list-style-image: none; list-style-position: outside;"><li>No items</li></ul>';

 else

 foreach ( $items as $item ) : ?>
 <ul style="list-style-type:none; list-style-image:none; list-style-position:outside; margin-bottom: 0px">
 <li><!--<strong><?php echo $item[ 'title' ]; //User name ?></strong><br />-->

 <?php echo $item[ 'content' ][ 'encoded' ]; ?>

 <hr style="border: 1px solid #ddd; margin-bottom: 8px" />
 </li>
 </ul>
 <?php endforeach;
}

Don’t forget to wrap the code in <?php ?>

I want to thank John Kolbert for helping me with printing the content:encoded portion. http://pastebin.com/m1588fb30

See it in action: http://wordcamp.la/attendees/

Web Master

Hi, I am Miguel, I bought this site in 2009. So I now run or manage the site. Please visit my new website or follow me on twitter @W3i.

View Comments

Recent Posts

Adsense Pro Ultimate – Top Selling CTR Worpress Theme Review

Classic CTR Themes For WordPress have made it pretty easy to build informational websites using…

6 hours ago

How to Incorporate a Website into Your Website Marketing Efforts

In today's techno-centric culture, you simply must have a business website, no matter how small…

6 hours ago

WordPress Tips for Photographers

Photography is the art of capturing naturalistic images with the help of photographic cameras. It…

18 hours ago

10 Best Digital Marketing Plugins for WordPress 2022

Have you opened up a new website or a business and want to drive more…

1 day ago

Configure your WordPress Site for SEO

WordPress has evolved greatly from its origin as a powerful blogging platform to an effective…

2 days ago

In the yеar 2002, Mіcrоѕoft саmе uр wіth a whоlе new рlаtfоrm for developing арplicаtiоnѕ.

Busіnеsѕеs аnd orgаnіzatіоns аll аrоund the wоrld arе loоking fоr а ѕоlutiоn thаt wоuld prоvе…

2 days ago