Yelp Widget Pro Premium allows you to add one or more Yelp widgets anywhere on your WordPress website using widgets and shortcodes.

Using the widget shortcode can be useful for various reasons including further integration into your WordPress post and page content beyond the range of widgetized sidebars. There are two shortcodes found in Yelp Widget Pro: [yelp-widget-pro] and [yelp-widget-pro-map] Yelp Widget Pro shortcode examples can be found on the Yelp Widget Pro Demo site.

[yelp-widget-pro] Usage

The yelp-widget-pro shortcode allows you to display Yelp data exactly how you would in the widget. Simply set the options to customize a shortcode that’s perfect for your use case. To get started, the most basic usage of the shortcode requires you choose an API option: Yelp Search Method Basic Usage Example:

Basic Yelp Widget Premium Shortcode Example

[yelp-widget-pro id="sushi-ota-san-diego"]

Click the code to select all

Notice the required argument id.

Yelp Business Method Basic Example:

Basic "Location Based" Yelp Widget Premium Shortcode Example

[yelp-widget-pro term="Bars" location="San Diego"]

Click the code to select all

Notice the required arguments of term and location. For more information on which API method to use please visit: Yelp’s APIs Explained for use with Yelp Widget Pro


Output Options

You can use the shortcode within your page and post content as you would any normal shortcode. Ensure you are using the shortcode within the WordPress loop. Here is a very basic use of the shortcode:

"Business ID" Method Yelp Widget Premium Shortcode example

[yelp-widget-pro id="sushi-ota-san-diego"]

Click the code to select all

Want to use the shortcode within your theme files? You can output the shortcode using PHP and the do_shortcode function for use within your theme files like so:

Output the Yelp Widget Premium Shortcode in your Theme Template files

<?php echo do_shortcode('[yelp-widget-pro id="sushi-ota-san-diego"]'); ?>

Click the code to select all


Shortcode Options

The Yelp Widget Pro shortcode options vary depending on how you would like to use the widget. The following is a resource displaying various shortcode options that are supported by the plugin.


Search Method

The Search Method allows you to display various businesses based on a search term and location. This method does not support the display of Yelp reviews due to Yelp’s API limitations. Required: the location argument is required alongside the term argument.

term
For use with Search Method Yelp widgets. Use this option to display a business listings based on a search term. The expected value is a basic search term such as bars, coffee shops, restaurants, etc.

Yelp Widget Premium "Search Method" with Term and Location Shortcode Example

[yelp-widget-pro term="coffee" location="Seattle"]

Click the code to select all

location
For use with Search Method Yelp widgets. This method is required to search a specific area for your specific term. Required: location is a required argument. The default location, if none is specified, is “San Diego”.
limit
Set the number of results returned by the search query. The default value is “3”
profile_image_size
Customize the size of the business profile image for all results. The default value is “60×60”
  • 40x40 – extra-small profile image size (40×40)
  • 60x60 – small profile image (60×60)
  • 80x80 – medium profile image (80×80)
  • 100x100 – large profile image (100×100)

Yelp Widget Premium Profile Image Size Shortcode Example

[yelp-widget-pro term="coffee" location="Seattle" profile_image_size="100x100"]

Click the code to select all


Business Method

The Business Method allows you to display a specific business listing based on the Yelp Business ID. How to get a business on Yelp’s Business ID. Note, this is the only method that support displaying Yelp reviews.

id
For use with Business Method Yelp widgets. Use the “id” argument to display a singular business. The expected value is the Yelp business ID.

Basic "Business Method" Shortcode example

[yelp-widget-pro id="sushi-ota-san-diego"]

Click the code to select all

reviews
Display 3 Yelp review snippets for each business. The default value is “false”

Show Business Reviews Shortcode Example

[yelp-widget-pro id="sushi-ota-san-diego" reviews="true"]

Click the code to select all

reviews_filter
Default: none. Set the minimum star rating of the reviews that should appear on your site.

Show only 5 star reviews for this business

[yelp-widget-pro id="sushi-ota-san-diego" reviews="true" reviews_filter="5"]

Click the code to select all

avatar
Customize the size of the reviewer’s profile image (avatar). The default value is “60×60”
  • 40x40 – extra-small profile image size (40×40)
  • 60x60 – small profile image (60×60)
  • 80x80 – medium profile image (80×80)
  • 100x100 – large profile image (100×100)

Business Avatar Size Shortcode Attribute Example

[yelp-widget-pro term="coffee" location="Seattle" avatar="100x100"]

Click the code to select all

hide_read_more
Hide the “Read Full Review” link below each individual review. The default value is “false”

"Hide Read More" Shortcode Attribute Example

[yelp-widget-pro id="sushi-ota-san-diego" reviews="true" hide_read_more="true"]

Click the code to select all

custom_read_more
Customize the “Read Full Review” hypertext below each individual review. The default value is “Read Full Review”

"Custom Read More" Shortcode Attribute Example

[yelp-widget-pro id="sushi-ota-san-diego" reviews="true" custom_read_more="Read Entire Review"]

Click the code to select all


Global Options

The following options work with Yelp Widget Pro regardless of API Method. You may add the following options to your shortcode parameters to enhance the performance and functionality.

cache
Cache API requests from Yelp for faster loading and conservation of API requests. By default, Yelp only allows 100 request per day. Caching requests will greatly improve performance and save requests.
  • 1 Hour
  • 3 Hours
  • 6 Hours
  • 12 Hours
  • 1 Day
  • 3 Days
  • 1 Week

Note: cache=”None” can be used for testing. You should set it to cache=”1 Week” when testing is complete.

"Cache" Shortcode Attribute Example

[yelp-widget-pro term="coffee" location="San Diego" map="true" cache="1 Day"]

Click the code to select all

map
Display a Google map displaying one or many listings. The default value is “false”.

"Show Google Map" Shortcode Attribute Example

[yelp-widget-pro term="coffee" location="San Diego" map="true"]

Click the code to select all

map_disable_scroll
Disable the use of the mousewheel to zoom in and out of the map. This option is helpful if your map is getting in the way of scrolling. The default value is “false”.

"Disable Map Scroll" Shortcode Attribute Example

[yelp-widget-pro term="coffee" location="San Diego" map="true" map_disable_scroll="true"]

Click the code to select all

map_position
Specify whether to display the Google Map above or below the output. The default value is “below”.
  • above
  • below

"Map Position" Shortcode Attribute Example

[yelp-widget-pro term="coffee" location="San Diego" map="true" map_position="above"]

Click the code to select all

address
Display the business address. The default value is “false”.

"Show Business Address" Shortcode Attribute Example

[yelp-widget-pro term="coffee" location="San Diego" address="true"]

Click the code to select all

phone
Display the business phone number. The default value is “false”.

"Show Phone Number" Shortcode Attribute Example

[yelp-widget-pro term="coffee" location="San Diego" phone="true"]

Click the code to select all

target_blank
Specify whether links open in a new window or not. Default option is “true”.

"Open in New Tab" Shortcode Attribute Example

[yelp-widget-pro term="coffee" target_blank="false"]

Click the code to select all

no_follow
Specify whether remove rel=”nofollow” to links. Default option is “true”.

"No Follow" Shortcode Attribute Example

[yelp-widget-pro term="coffee" no_follow="false"]

Click the code to select all

align
Float the Yelp widget output right, left or no float value at all. The default value is “right”.
  • left – align the widget output to the left
  • right – align the widget output to the right; default value
  • none – no float

"Align" Shortcode Attribute Example

[yelp-widget-pro id="sushi-ota-san-diego" align="none"]

Click the code to select all

width
Customize the widget’s width using this argument. If you wish to customize the width the widget’s default value. Be sure to use pixel or percentage values.

"Widget Width" Shortcode Attribute Example

[yelp-widget-pro id="sushi-ota-san-diego" width="350px"]

Click the code to select all

See our “Shortcode Alignment” demo page for additional code examples specifically when combining “width” with “alignment”.


 

[yelp-widget-pro-map] Usage

The [yelp-widget-pro-map] shortcode allows you to output a powerful Google Map listing various Yelp businesses by a search term and location.

Options

location
Set the location for this widget using the name of a place, such as “Tucson, Arizona” or “1600 Amphitheatre Parkway, Mountain View, CA”. The value you input is run through Google Maps’ Geocoding Service. The default value is “San Diego”.
search_term
Set the default search term for the map, such as “Sushi” or “Coffee”. The default value is “Restaurants”.

"Location" and "Search Term" Shortcode Attribute Example

[yelp-widget-pro-map location="Tucson, Arizona" search_term="coffee"]

Click the code to select all