Connect with us

Tips & Tricks

Use WordPress to print a RSS feed for Eventbrite attendees

Published

on

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/

Tips & Tricks

Remove the title attribute using jQuery

Published

on

In WordPress, when you use wp_page_menu your anchor attribute’s usually carry a title with the same name. I’m not sure if it’s correct to do this, but it bother me when I hover over a page menu navigation link and I get a hover of the title.

So on my site I used jQuery to remove the title:

$("#nav a").removeAttr("title");

Pretty simple huh?

Continue Reading

Tips & Tricks

How to: Open external links in a new window

Published

on

Over the weekend, I attended WordCamp Denver, and I was asked by John Hawkins how to force links to open in a new tab with out editing the source code. So, today lets learn a simple jQuery trick to open all external links in your site in a new tab or window. We are going to make sure you have jQuery active on your site, you can do this easily in WordPress, since it’s bundled with the latest installations. Use this code in your header: <?php wp_enqueue_script('jquery'); ?> then, below the wp_head add the following:

<script type="text/javacript">
var $j = jQuery.noConflict();

$j(document).ready(function() {
//external attribute
    $j("a:not([@href*=http://YOURSITE.com/])").not("[href^=#]")
        .addClass("external")
        .attr({ target: "_blank" });
    }
);
</script>

That’s it, just make sure you change the http://YOURSITE.com to your website.

Update

If you like you can remove the var $j = and replace all $j with simply just $

 

Continue Reading

Themes

Fixing plugins not compatible with hybrid 0.4.2

Published

on

Hey everyone, as you may have noticed I have a running on the site. While everything almost everything moved over smoothly, there was an issue with how my parent theme striped text in typography. This caused some plugins, like cformsII to not be allowed to print to the screen. Justin had helped to find a fix to filter the hybrid_typography function.

Originally this function filtered out and changed some text that would not validate as XHTML. This had to be removed by running a new function in the child theme’s function.php file.

add_action('init', 'remove_typography');

function remove_typography() {
	remove_filter('the_content', 'hybrid_typography', 11);
}
Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Roddy Ricch Net Worth: 5 Interesting Facts You Should Know

Roddy Ricch Net Worth: 5 Interesting Facts You Should Know

Rodrick Wayne Moore, Jr., who is better known by his stage name as Roddy Ricch, is an American rapper, singer, songwriter and record producer. Here are some interesting facts about Roddy Ricch including his personal fortune, earnings, career and more. 1. He started rapping at the age of 8 Rodrick was born on October 24, […]

Joey Chestnut Net Worth: How Rich is the Competitive Eater Actually?

Joey Chestnut Net Worth: How Rich is the Competitive Eater Actually?

Joseph Christian Chestnut is an American competitive eater. But, he isn’t just any competitive eater, he is currently ranked as number one in this unique sport according to Major League Eating. As of 2019, Joey Chestnut net worth is estimated to be $2 million. Chestnut was born on November 25, 1983, in Vallejo, California. Having grown […]

Shroud Net Worth: How Rich is Streamer Mike Grzesiek Actually?

Shroud Net Worth: How Rich is Streamer Mike Grzesiek Actually?

Michael Grzesiek, who is better known as Shroud, is a video game streamer and a former pro-Counter-Strike: Global Offensive (CS:GO) player. He was one of the most popular streamers on the live streaming platform Twitch but recently made a bold move to join Microsoft owned new streaming platform named Mixer. As of 2019, Shroud net […]

Lil Mosey Net Worth: How Much is the Rapper Worth in 2019?

Lil Mosey Net Worth: How Much is the Rapper Worth in 2019?

Lathan Moses Echols, who is better known by his stage name as Lil Mosey is an American rapper and songwriter. He is best known for his hit song called “Noticed” that managed to peak at the number 80 in the Billboard Hot 100 charts. In 2019, Lil Mosey was included in the XXL Freshman Class […]

Trending