Events Calendar Pro Template Tags

Display functions for use in WordPress templates.

Recurring Event List Link

tribe_all_occurences_link([int $postId = null])

Display link for all occurrences of an event (based on the currently queried event).

Parameters

  • int
    $postId: (optional)

Returns

  • void

More Info

  • since: 2.0

Google Calendar Link

tribe_get_gcal_link([int $postId = null])

Returns an add to Google Calendar link. Must be used in the loop

Parameters

  • int
    $postId: (optional)

Returns

  • string

More Info

  • return: URL for google calendar.
  • since: 2.0

iCal Link

tribe_get_ical_link()

Returns a sitewide ical link

Returns

  • string

More Info

  • return: URL for ical dump.
  • since: 2.0

Day View Link

tribe_get_linked_day(string $date, string $day)

Get a link to day view

Parameters

  • string (in YYYY-MM-DD format, i.e. ’2012-05-03′ for May 3rd, 2012)
    $date
  • string (in single digit format, i.e. ’5′ for the 5th day of the month)
    $day

Returns

  • string

More Info

  • return: HTML linked date
  • since: 2.0

Recurrence Text

tribe_get_recurrence_text([int $postId = null])

Get the textual version of event recurrence e.g Repeats daily for three days

Parameters

  • int
    $postId: (optional)

Returns

  • string

More Info

  • return: Summary of recurrence.
  • since: 2.0

iCal Link (Single)

tribe_get_single_ical_link()

Returns an ical feed for a single event. Must be used in the loop.

Returns

  • string

More Info

  • return: URL for ical for single event.
  • since: 2.0

Event Recurrence

tribe_is_recurring_event([int $postId = null])

Test to see if event is recurring.

Parameters

  • int
    $postId: (optional)

Returns

  • bool

More Info

  • return: true if event is a recurring event.
  • since: 2.0

Get Event Custom Fields

tribe_get_custom_fields([int $postId = null])

Gets an array of all custom fields for an event.

Parameters

  • int
    $postId

Returns

  • array

More Info

  • since: 2.0

Examples

<?php tribe_get_custom_fields(); ?>

Display Event Custom Fields (Display)

tribe_the_custom_fields([int $postId = null])

Displays a definition term list of all custom fields for an event.

Parameters

  • int
    $postId

Returns

  • mixed

More Info

  • since: 2.0

Examples

<?php tribe_the_custom_fields(); ?>

Get Single Event Custom Field

tribe_get_custom_field([string $label = null], [int $eventId = null])

Return a single custom field’s value by using its label instead of its (more obscure) ID.

Parameters

  • string
    $label
  • int
    $eventId

Returns

  • string

More Info

  • since: 2.0

Examples

<?php tribe_get_custom_field('MyCustomFieldLabel'); ?>

Display Single Event Custom Field (Display)

tribe_custom_field([string $label = null], [int $eventId = null])

Echo a single custom field’s value by using its label instead of its (more obscure) ID.

Parameters

  • string
    $label
  • int
    $eventId

Returns

  • string

More Info

  • since: 2.0

Examples

<?php tribe_custom_field('MyCustomFieldLabel'); ?>

Modern Tribe Newsletter

Insight, Discounts & Notices for People Who Kick Ass..