Support

Home Forums Event Espresso Premium Sharing events on multiple sites

Sharing events on multiple sites

Posted: July 31, 2013 at 3:05 pm


David Waterman

July 31, 2013 at 3:05 pm

Hello,

I am working on a very interesting project to share events from a main site on 2 other sites (which I call child sites – not sub-domains by the way).

The main site is where I am planning to manage all my events, categories, etc. related to Event-Espresso and on the child-sites I would like to display the events from the main site without having to actually create/edit an event 3 times (on each site). I know there might be some challenges to get this working, but I am willing to take the risk.

In total I will have 3 sites – all of them are WordPress sites and they will have different themes, but the events will be the same for all of them.

I can’t seem to get any information related to this.

Is there any other person who tried this before? or is there any examples of how I can do this? or maybe examples how I can do this using the API?

Any help will be appreciated.

Thanks


Seth Shoultes

  • Support Staff

July 31, 2013 at 3:21 pm

Hi David,

If you take a look at the API documentation, near the bottom of that page, there are some links to code examples that might help.


Seth Shoultes

  • Support Staff

July 31, 2013 at 3:23 pm

Here’s the URL to that page:
https://eventespresso.com/wiki/api-addon/


David Waterman

August 1, 2013 at 2:52 pm

Hi Seth,

I was able to get all the events from one of my sub-sites, but now I want to go a step further – I want to actually filter the events displaying on http://brokers.ktbenefits.info/json-list-events.php by a category called “CE Classes – Brokers” see this image (http://brokers.ktbenefits.info/cat.png) – I have a about 1 to 3 events with this category as of now.

This is the query that I have right now:
$url = “http://easytorsvp.com/espresso-api/v1/events/public?Datetime.event_start__gt=”.urlencode($curdate);
Which is displaying all public events starting after the current date.

I tried something like this earlier to filter the category – but this did not work:
$url = “http://easytorsvp.com/espresso-api/v1/events/public?event_category_id__like=%ce_class-brokers%&Datetime.event_start__gt=”.urlencode($curdate);

This is the page where I am actually displaying the data right now: http://brokers.ktbenefits.info/json-list-events.php

I looked around throughout the API documentation and did not see anything specifying how to filter events by a category – is there any help on how to do this ? what do I need to change on my query?

Thanks in advance for your help.


Seth Shoultes

  • Support Staff

August 1, 2013 at 3:26 pm

Hi David,

Please try using this format when filtering by categories:
http://easytorsvp.com/espresso-api/v1/events/public.pretty_json?Category.name__like=%25Brokers


David Waterman

August 7, 2013 at 11:58 am

Hi Seth,

Everything is working as I want it to thanks to your help.

There is one last thing that I want to do – it might be so simple, but yet a little complicated with the code that I have – I just want to open every event in a new tab when the event is clicked from the calendar.

This is the code that I have:
echo ‘{“title”: “‘.$event[‘name’].'”, “start”: “‘.date(‘Y-m-d’,strtotime($event[‘Datetimes’][0][‘event_start’])).'”, “end”: “‘.date(‘Y-m-d’,strtotime($event[‘Datetimes’][0][‘event_end’])).'”, “url”: “http://events.ktbenefits.info/event-registration/?ee=’.$event[‘id’].'”}’;

My question is: where do I have to place “target=_blank” to open it on a new tab ? this is the last thing that I believe is missing on my side.

Here is an example of the calendar:
http://clients.ktbenefits.info/json-calendar.html

Thanks for your help once again.


Josh

  • Support Staff

August 7, 2013 at 1:48 pm

Hi David,

I’m not familiar enough with the ins and outs of the API to know whether it’s possible to add target=_blank via the API call.

However, since the page is already loading jQuery, you can add a bit of jQuery to the page that will add target=_blank to the calendar’s event links.

http://stackoverflow.com/a/804360


David Waterman

August 13, 2013 at 1:56 pm

Hi Josh and Seth,

I was able to do what I had in mind thanks to the help that you guys provided.

Thanks again for everything.


David Waterman

August 22, 2013 at 1:38 pm

Hello,

I have a custom field called (Company Name -> backend: company_name) that I added to all users profiles and I would like to create a field in event espresso and assign the custom field’s value to it. Whatever the value is on the WP custom field will be the value of the Event espresso field that I created.

I did not find anything related to this – can any of you guys help me with this ?

Thanks.


Dean

August 27, 2013 at 12:25 am

Hi,

I answered the above on this thread https://eventespresso.com/topic/assign-a-custom-field-value-to-a-event-espresso-question-field-value

The support post ‘Sharing events on multiple sites’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso