How to use hooks to get event title and date?

Home Forums Calendar Products Events Calendar PRO How to use hooks to get event title and date?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #68823
    David Dolenc
    Participant

    I would like to add the option to sign-up for the events by providing the “sign up” button on the single event page that will open a Gravity form. I know how to dynamically populate a Gravity form using hooks, but could not find a hook that would let me get the basic event data (e.g., title, date…) from the Events Calendar. Could you please provide a short example of a hook use that extracts event name or date?

    #69088
    Barry
    Member

    You can use WordPress’s get_post() function to retrieve the event’s post object and retrieve the title as you would for any other page or post – to get the event start date you might use our tribe_get_start_date() function (both of these accept the post ID as a parameter).

    Hope that helps!

    #69168
    David Dolenc
    Participant

    Works great! Thank you!

    #69262
    Kelly
    Participant

    Fantastic! Thanks for letting us know, koledarcek. šŸ™‚

    I’m going to close this thread for now, but please open a new one if anything else comes up.

    #981286
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to use hooks to get event title and date?’ is closed to new replies.