Create Venues

Venues can be created programmatically using:

tribe_venues()->set_args( $venue_args )->create();

The $venue_args is an array with key-value pairs, accepting arguments like in this example:

$venue_args = [
    'venue'         => 'Published Venue',
    'status'        => 'publish',
    'show_map'      => false,
    'show_map_link' => false,
    'address'       => 'Venue address',
    'city'          => 'Venue city',
    'country'       => 'Venue country',
    'province'      => 'Venue province',
    'state'         => 'Venue state',
    'stateprovince' => 'Venue stateprovince',
    'zip'           => 'Venue zip',
    'phone'         => 'Venue phone',
    'website'       => 'http://venue.com',
];

The only field that is required when creating a new venue is the title, which is aliased as 'venue'

Further information about accepted arguments when creating a venue:

  • string $address The venue address field, normally street and number.
  • string $country Which country the venue happens, full name of the country, no abbr.
  • string $city The city for the venue.
  • string $state_province State or province for the venue, available for venues outside of the US.
  • string $state The state for the venue in case of a US-based venue.
  • string $province Province for the venue (mostly deprecated, use state_province).
  • string or int $zip Zip code of the venue.
  • boolean $overwrite_coordinates Did this venue get its coordinates overwritten manually.
  • string $latitude The latitude of the venue.
  • string $longitude The longitude of the venue.
  • string $geolocation_string The string we use to crawl and link to the maps provider.