Combine post grid with event manager plugin

Q&ACategory: PluginCombine post grid with event manager plugin
benny.malengier asked 2 years ago

I want to combine post grid with event manager. Current status:
I am able to get a nice grid, and show meta keys like Teacher and Age group. Nice.
One problem; when an event is in the past it should not show up anymore. Also, events need to be sorted ascending on date. Is there a way to achieve this? As a work around, I’m thinking of setting past events on post status Draft instead of Publish. However, in 2.0.15 I cannot select post status, only 3.0.1 has this. So my questions:

  1. is there a possibility to have integration with event manager?
  2. a setting to only show events in grid of date >= today, can this be done with current code via some meta search magic?
  3. as workaround, can 2.0.15 obtain a setting to select post status to show, as present in 2.0.1 and 3.0.1
benny.malengier replied 2 years ago

Ok, i dont mind using 3.0.1 It was unclear to me what would be the supported version towards the future. I’ll move to 3.0.1 . So some integration with event manager to be able to see events in the future, preferably with date sorted ascending on eventdate, not post date, would be a great addition going forward. Now i hack post date and post status to abtain the grid i want

Hasan Staff replied 2 years ago

Thanks for your reply, haven’t check the features Meta Query on 3.0.1, please see the screenshot can you please try .. Regards

benny.malengier replied 2 years ago

I did some tries. I’m not a php programmer though, don’t know what is supposed to workkey: _EVENTDATESvalue: ??? how to enter today? did some tries with date formatscompare: > type: tried CHAR and DATEIt always returns empty post grid with this. Pointers to make this work?

benny.malengier replied 2 years ago

Ok, I could solve it myself. I can select all events after a date via the meta query:Key: _event_start_dateValue: 2015-12-01Compare: >=Type: DATEOf course I need to update Value from time to time so as not to have old events showing. Would there be a way to have as Value: today ? Perhaps I can put there a function? Something like NOW() ?

1 Answers
Nur Hasan Staff answered 2 years ago

Thanks for your post.
Can you please tell me first whats the problem using 3.0.1,
you see version 2.0.15 and 3.0.1 are huge difference , some features wasn’t before like meta query and i bring these on 3.0.1,
Which grid i can see on your can also generate by 3.0.1
I do not work for 2.0.15 as it is outdated, but i can help you for extra code, but i would recommend use 3.0.1.
Best Regards

benny.malengier replied 2 years ago

Ping here, see reply earlier.Issue remaining: is there a way to set date in Comparison to today? This to allow automatic view of items more recent than today, or older than today. Or should I post a new support request for that?