Event Calendar Pro API

Home Forums Calendar Products Events Calendar PRO Event Calendar Pro API

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1380725
    Ed Fowler
    Participant

    Hello,

    Can you please provide an example of how to make a correct API call to generate an event calendar from this shortcode: [tribe-events category=”Public Events”]?

    My Event Calendar data lives on a Private WordPress Site and I would like to display the Calendar on the front-end of a separate Public WordPress site via an API call.

    Thanks,

    Ed

    #1382909
    Cliff
    Member

    Hi, Ed. The correct shortcode is tribe_events (underscore): https://theeventscalendar.com/knowledgebase/embedding-calendar-views-tribe_events-shortcode/

    Shortcodes are only useful on the same site. They’re not a site-to-site API.

    If you want to use the API, please reference https://theeventscalendar.com/knowledgebase/introduction-events-calendar-rest-api/

    You’ll need to use it with your own custom code.

    Please let me know if you have any follow-up questions on this topic.

    #1382915
    Ed Fowler
    Participant

    Thanks, Cliff.

    I previously reviewed the API article. Can you please tell me how to perform a GET for the entire calendar (not for just individual events)?

    -Ed

    #1383211
    Cliff
    Member

    I know the https://theeventscalendar.com/knowledgebase/introduction-events-calendar-rest-api/ article is pretty detailed and lengthy.

    /wp-json/tribe/events/v1/events

    under the “A first example” heading details this.

    The self-documenting /wp-json/tribe/events/v1/doc may also be helpful.

    Please let me know if you have any follow-up questions on this topic.

    #1383223
    Ed Fowler
    Participant

    Maybe using the Event Aggregator plugin is a better solution. If I add the Event Aggregator plugin to the my public WordPress site, can I pull events into this site from a Private WordPress site with Events Calendar Pro installed?

    #1385166
    Cliff
    Member

    I’m unsure what you mean by a “Private WordPress site” but I’d think the answer is yes.

    If The Events Calendar (PRO or not) is running on both Site A and Site B, use the “Other URL” import option. See more details here: https://theeventscalendar.com/knowledgebase/creating-hub-site-event-aggregator/

    I’d suggest trying it out for up to 30 days and getting a refund if it doesn’t work as desired.

    Please let me know if you have any follow-up questions on this topic.

    #1385170
    Ed Fowler
    Participant

    Hi Cliff,

    Private site meaning the site requires the user to login to view the event
    calendar. Here’s our private site: http:\\cthe.us\private

    Will the aggregator work with this setup?

    #1385247
    Cliff
    Member

    Because all the imports are actually processed on our Event Aggregator server, the import URL needs to be accessible publicly.

    #1394821
    Ed Fowler
    Participant

    Hi Cliff, the Event Aggregator plugin worked! Is it possible to use the “Refine” field in the import tab to specify certain Event Calendar Pro categories that I want imported?

    Thanks,

    Ed

    #1395174
    Ed Fowler
    Participant

    The alternative would be to sync ALL events and use a shortcode to filter by specific categories. However, if we add a new page containing a shortcode- [tribe_events view=”list” category=”Public Event”]- is there any way to add the Events Filter Bar (licensed add-on) to the page?

    #1396176
    Cliff
    Member

    I’m glad to hear that!

    You’ll need to do some trial and error here to get things working exactly as you’d need. I’d recommend in a staging/testing site.

    You could search for do_action and apply_filters in this directory: /wp-content/plugins/the-events-calendar/src/Tribe/Aggregator/

    I believe there are hooks sufficient to accomplish what you’re wanting.

    If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.

    #1398093
    Ed Fowler
    Participant

    Hi Cliff,

    Our developers tried applying a do_action while importing the calendar, but to no avail. Can you please provide a bit more direction to sync by specific categories? Is there an Event Calendar article or code snippet that you can reference in your response?

    Thanks in advance,

    Ed

    #1398165
    Cliff
    Member

    Here’s a snippet example, which you could view what’s in $record and do what you need based on what’s in there:

    https://gist.github.com/cliffordp/4d4875f93ee9acf08584007c978919a0

    If you still can’t get it figured out, please provide me the full code of your customization attempt.

    #1405859
    Ed Fowler
    Participant

    Thanks for the assist Cliff!

    #1406031
    Cliff
    Member

    You bet! We’re always glad to help.

    Have a great rest of your week.

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Event Calendar Pro API’ is closed to new replies.