Home › Forums › Calendar Products › Events Calendar PRO › Event Calendar Pro API
- This topic has 15 replies, 3 voices, and was last updated 6 years, 4 months ago by Cliff.
-
AuthorPosts
-
November 11, 2017 at 10:56 am #1380725Ed FowlerParticipant
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
November 14, 2017 at 12:23 pm #1382909CliffMemberHi, 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.
November 14, 2017 at 12:39 pm #1382915Ed FowlerParticipantThanks, 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
November 14, 2017 at 8:42 pm #1383211CliffMemberI 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.
November 14, 2017 at 9:27 pm #1383223Ed FowlerParticipantMaybe 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?
November 16, 2017 at 4:01 pm #1385166CliffMemberI’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.
November 16, 2017 at 4:17 pm #1385170Ed FowlerParticipantHi Cliff,
Private site meaning the site requires the user to login to view the event
calendar. Here’s our private site: http:\\cthe.us\privateWill the aggregator work with this setup?
November 16, 2017 at 7:51 pm #1385247CliffMemberBecause all the imports are actually processed on our Event Aggregator server, the import URL needs to be accessible publicly.
November 29, 2017 at 7:53 am #1394821Ed FowlerParticipantHi 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
November 29, 2017 at 11:53 am #1395174Ed FowlerParticipantThe 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?
November 30, 2017 at 3:24 pm #1396176CliffMemberI’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.
December 4, 2017 at 1:21 pm #1398093Ed FowlerParticipantHi 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
December 4, 2017 at 2:46 pm #1398165CliffMemberHere’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.
December 14, 2017 at 11:12 am #1405859Ed FowlerParticipantThanks for the assist Cliff!
December 14, 2017 at 3:18 pm #1406031CliffMemberYou bet! We’re always glad to help.
Have a great rest of your week.
-
AuthorPosts
- The topic ‘Event Calendar Pro API’ is closed to new replies.