Yelp It

A simple WordPress plugin

Updated March, 14, 2012 – 0.4.1:

  • Option to open links in new windows
One or more parameters are invalid in request

Yelp It is a WordPress plugin that allows you to embed badge-like Yelp profiles for any business, like the one on the right.

To use it, just use the shortcode in this format:

[yelpprofile term="search term" location="city, zip, etc" limit="5" align="right"]

…to show results of a search, or to show a specific business:

[yelpprofile id="the-waterboy-sacramento" align="left"]

The id is the last part of the a Yelp business page’s URL. For example, in the above example I got the id from the Yelp URL: http://www.yelp.com/biz/the-waterboy-sacramento

It also accepts an optional argument of align, which can be set to left, right, or center.

Installation

Step 1

Just copy the folder into your wp-content/plugins folder (download via the WordPress plugins page). Then go to Yelp Config under Plugins in the WordPress Admin menu. This is where you copy/paste your Yelp API credentials. What are those, you ask?

Step 2

This plugin requires you to have your own Yelp API key. An API is just a fancy acronym that basically means you get access to Yelp’s data using the power of computers and internets. It’s free, just sign in to Yelp and go to manage your API settings. This plugin uses v2 of Yelp’s API, so make sure you click on the v2 button.

Once you click, it will instantly present you with all your credentials, that was easy!

Step 3

After you put this widget on your site, ask Yelp for more calls. You are given 100 calls a day by default, but that’s only 100 views a day before the badge stops working. Go back to the Yelp API management page and type in the text box why you want more calls and the URL of your site (include a link to your site where you use this widget). Submit your request and Yelp will get back to you.

Usage

Enter a shortcode, like this:

The id is the last part of the a Yelp business page’s URL. For example, in the above example I got the id from the Yelp URL: http://www.yelp.com/biz/the-waterboy-sacramento

FAQ

Why do I have to get my own Yelp API keys? Can’t I use yours?
If I gave you mine, you could go off and make your own Yelp Application with it that could violate their Terms of Service. Then Yelp shuts my account down and nobody can use it! I know you would never do that, but someone else might.
Why am I getting the error “Yelp is Tired”?
That means you have hit your Yelp API call limit. By default, you get 100 calls per day. That means if the widget is displayed 100 times a day, it blocks the rest of your calls until the next day. Visit Yelp’s API access management page and fill out the form that says “Explain why you need additional access to the API”. Try to include the site/page you are using the widget on so they can see how you’re using it. They will usually increase your limit to 10,000 calls per day.
I put the shortcode in a widget or in a sidebar and it’s just showing [yelpprofile... ]. How do I make it show the Yelp widget?
If you add a shortcode to a widget, you must enable shortcodes for your widgets in the Theme that you are using. Go to the your theme’s folder or the Appearance > Editor in the WordPress Dashboard and edit functions.php, add this line: add_filter('widget_text', 'do_shortcode');.

Ask me something

Changelog

0.4.1 – March 14, 2012

  • Option to open links in new window

0.4 – March 13, 2012

  • Broken, don’t use

0.3 – May 8, 2011

  • Implicit method selection, no need to define method parameter anymore.

0.22 – Mar 8, 2011

  • Made the images in the widget not inherit theme’s image styling by default.
  • Set the line-height of all text so spacing should be consistent by default.

0.21 – Feb 2, 2011

  • Overhauled the settings storage/updating since two people reported theirs were disappearing randomly. If it still does it, let me know.
  • Minute changes to the default shadow.

0.2 – Dec 20, 2010

  • Multiple results! Set limit to more than one, it works!
  • Get a business by its Yelp ID using the business method, no more relying on search.
  • Better error handling, hide .yelp-error if you don’t want them to show up.

Tips

You can tip me if you want. A cup of coffee ($2) would be greatly appreciated :)





Flattr this