This is a Template Tag plugin for WordPress that will connect with BandsInTown (BIT) API.
Current Version: 0.4
Insert the following on your page to generate a link to purchase tickets using your app_id where you want the href to appear:
<?php
get_ticket_url($band, $date, $txt, $alt_url);
?>- $band: string. Name of the band in quotes (single or double). Examples: 'Creed' or 'Foo Fighters'
- $date: string. Date of the event in YYYY-MM-DD format in quotes. Example: '2015-08-20'
- $txt: string (optional). This is the text to be displayed within the hyperlinked portion of the href. Example: 'tickets' or 'buy tickets'.
- $alt_url: string (optional). In the event that tickets are unavailable, this URL will be used for the href. Example: 'http://www.seatgeek.com/george+ezra/buy_tickets?AAz284TR'
Input:
<?php
get_ticket_url("Bronze Radio Return",
"2015-10-29",
"buy tickets",
"http://www.google.com");
?>or with Insert PHP plugin:
[insert_php]
get_ticket_url("Bronze Radio Return",
"2015-10-29",
"buy tickets",
"http://www.google.com");
[/insert_php]
Output:
- If tickets are available:
- If tickets are unavailable:
- Sold out! Check SeatGeek
Input:
<?php
get_ticket_url("Bronze Radio Return",
"2015-10-29");
?>or with Insert PHP plugin:
[insert_php]
get_ticket_url("Bronze Radio Return",
"2015-10-29");
[/insert_php]
Output:
- If tickets are available:
- If tickets are unavailable:
- Sold out! Online resale unavailable
NOTE: you can change the text in the output by adjusting the default Content constants.
Similar to get_ticket_url, but returns the ticket link, date and venue information in table form for a given event:
<?php get_ticket_list($band, $date, $alt_url);?>or with Insert PHP plugin:
[insert_php]
php get_ticket_list($band, $date, $alt_url);
[/insert_php]
- $band: string. Name of the band in quotes (single or double). Examples: 'Creed' or 'Foo Fighters'
- $date: string. Date of the event in YYYY-MM-DD format in quotes. Example: '2015-08-20'
- $alt_url: string (optional). In the event that tickets are unavailable, this URL will be used for the href. Example: 'http://www.seatgeek.com/george+ezra/buy_tickets?AAz284TR'
Input:
<?php
get_ticket_url("Bronze Radio Return",
"2015-10-29",
"http://www.google.com");
?>or with Insert PHP plugin:
[insert_php]
get_ticket_url("Bronze Radio Return",
"2015-10-29",
"http://www.google.com");
[/insert_php]
Output: Bronze Radio Return
Venue Date Tickets Vinyl 10/29/2015 at 8:30PM Buy on BandsInTown
Returns a list of upcoming events for one or more artists for a given area.
<?php
events_by_artist($artists, $txt, $radius, $city, $state);
?>or with Insert PHP plugin:
[insert_php]
events_by_artist($artists, $txt, $city, $state, $radius);
[/insert_php]
- $artists: string or array of strings. Enter one or more artists names, separated by a comma. Examples: 'Poison,Of Monsters and Men, imagine dragons'
- $txt: string (optional). This is the text to be displayed within the hyperlinked portion of the href. Example: 'tickets' or 'buy tickets'
- $radius: integer (optional). Radius in miles from location for search. Max 150. Example: 75
- $city: string (optional). City to center the search. Default is Atlanta. Example: 'Grand Rapids' or 'Charlotte'
- $state: string (optional). Two letter state code. Default is 'GA'. Example: 'IA' or 'NC'
Input:
<?php
events_by_artist(
'Of Monsters and Men, Bronze Radio Return, Drew Holcomb',
'Buy Tickets',
150
);
?>or with Insert PHP plugin:
[insert_php]
events_by_artist(
'Of Monsters and Men, Bronze Radio Return, Drew Holcomb',
'Buy Tickets',
150
);
[/insert_php]
| Artist | Date | Venue | Tickets |
|---|---|---|---|
| Drew Holcomb & The Neighbors | 08/27/2015 at 7:00PM | Peace Center (Greenville) | Buy Tickets |
| Drew Holcomb & The Neighbors | 08/28/2015 at 7:00PM | Cottonseed Studios (Opelika) | Buy Tickets |
| Of Monsters and Men | 10/07/2015 at 7:30PM | Ryman Auditorium (Nashville) | Buy Tickets |
| Of Monsters and Men | 10/09/2015 at 8:00PM | Chastain Park Amphitheatre (Atlanta) | Buy Tickets |
| Bronze Radio Return | 10/23/2015 at 7:00PM | The Camp House (Chattanooga) | Buy Tickets |
| Bronze Radio Return | 10/24/2015 at 6:00PM | Deep Roots Festival (Milledgeville) | Buy Tickets |
| Bronze Radio Return | 10/29/2015 at 8:30PM | Vinyl (Atlanta) | Buy Tickets |
| Bronze Radio Return | 11/01/2015 at 7:00PM | The Grey Eagle (Asheville) | Buy Tickets |
| Drew Holcomb & The Neighbors | 11/12/2015 at 7:00PM | Track 29 (Chattanooga) | Buy Tickets |
| Drew Holcomb & The Neighbors | 11/14/2015 at 7:00PM | Buckhead Theatre (Atlanta) | Buy Tickets |
| Drew Holcomb & The Neighbors | 12/23/2015 at 7:30PM | Schermerhorn Symphony Center (Nashville) | Buy Tickets |
Returns a table of recommended upcoming events for a specific location. The recommendation is based on a comma delimited list of artists.
<?php
events_rec($artists, $txt, $radius, $city, $state);
?>or with Insert PHP plugin:
[insert_php]
events_rec($artists, $txt, $city, $state, $radius);
[/insert_php]
- $artists: string. Enter one or more artists names, separated by a comma. Examples: 'Poison,Of Monsters and Men, imagine dragons'
- $txt: string (optional). This is the text to be displayed within the hyperlinked portion of the href. Default is 'Buy on BandsInTown'. Example: 'tickets' or 'buy tickets'
- $radius: integer (optional). Radius in miles from location for search. Max 150. Default is 25. Example: 75
- $city: string (optional). City to center the search. Default is Atlanta. Example: 'Grand Rapids' or 'Charlotte'
- $state: string (optional). Two letter state code. Default is 'GA'. Example: 'IA' or 'NC'
Input:
<?php
events_rec(
'Of Monsters and Men, Bronze Radio Return, Drew Holcomb'
);
?>or with Insert PHP plugin:
[insert_php]
events_by_artist(
'Of Monsters and Men, Bronze Radio Return, Drew Holcomb'
);
[/insert_php]
Output:
| Artist | Date | Venue | Tickets |
|---|---|---|---|
| Mumford and Sons | 04/11/2016 at 7:30PM | Infinite Energy Aren a (Duluth) | Buy on BandsInTown |
| Mumford and So ns | 04/12/2016 at 7:30PM | Infinite Energy Arena (Duluth) | Buy on BandsInTown |
| Drew Holcomb & The Neighbors | 05/14/2016 at 7:00PM | Centennial Olympic Park (Atlanta) | Buy on BandsInTown |
| Royal Teeth | 05/22/2016 at 7 :00PM | The Masquerade (Atlanta) | Buy on BandsInTown |
| Air Traffic Controller | 05/27/2016 at 7:00PM | Private House Concert (Atlanta) | Buy on BandsInTown |
| Air Traffic Controller | 05/29/2016 at 7:00PM | Sunset Sessions at Piedmont Park (Atlanta) | Buy on BandsInTown |
- events_by_venue has been deprecated. The underlying functionality is no longer supported by BIT.
- Added events_rec. Allows user to pass a group of artists and returns a list of recommended events.