Forums › Forums › Search & Filter Pro › Search with Custom Post Type needs tweaking (Events from Event Manager Plugin)
- This topic has 15 replies, 2 voices, and was last updated 6 years, 7 months ago by
Anonymous.
-
Anonymous(Private) September 26, 2018 at 2:41 pm #189410
Hi,
I am using Search & Filter Pro on a site that is in development right now.I am using Events Manager (https://wp-events-plugin.com/), which has created the custom post type events. These are being displayed by Search and Filter Pro via shortcode on the events page
What I would like to achieve is:
1) Sort the upcoming events by order of event date. I have tried to set the sort order under Settings->Posts->Choose Meta Key, but I cannot find any field for the event start date from the plugin.
2) I would like to add a new search fields to the form (location and organiser), but again I can’t find these custom fields in the list.Should I be approaching the developer of the other plugin for help with this?
Thanks,
VictoriaTrevor(Private) September 26, 2018 at 3:45 pm #189418I redacted (and made a note for myself) out the sensitive details of your post.
These threads about the Events manager plugin I think are relevant:
https://support.searchandfilter.com/forums/topic/filtering-by-events-manager-dates/
https://support.searchandfilter.com/forums/topic/integration-of-events-manager-formats/
https://support.searchandfilter.com/forums/topic/show-results-with-event-manager/#post-84556Some of the posts with these threads are marked private, but do not contain anything you need to know.
Anonymous(Private) September 26, 2018 at 7:45 pm #189467Hi Trevor,
Thank you for the links. So, if I am able to capture the date in the correct format within Events posts, I should then be able to configure searchandfilter to sort by date. I will try this. Would I also be able to display only Events where the date is greater than today (upcoming events), if I go down that route?
I’m not sure I can see anything in the posts that helps me with the second part of my query though… I have a custom text field (Organizer) in the Events post, but the dropdown is just blank when I add it to the s&f form. Is my understanding correct, that if I have a text field, populated in Events, that the dropdown would pick up the values previously used for that text field? Or would the field need to be a dropdown itself, with pre-defined values, for it to work with s&f?
Thanks,
VictoriaTrevor(Private) September 26, 2018 at 8:02 pm #189485It is a bit convoluted, but this posts discusses how to do a user search for greater than a date:
https://support.searchandfilter.com/forums/topic/show-posts-with-post-meta-date/#post-188898
In fact that demo page it refers to also adds today’s date in the from field.
But, is this something you want to build in, as there is a way to compare to ‘today’ in the form design (the Post meta settings tab – next to the advanced tab).
The custom field, was it added using ACF, and if so, did you set the meta key in the form to a name preceded by an underscore (it should not have the underscore)?
Anonymous(Private) September 26, 2018 at 8:06 pm #189487I couldn’t see much of that post as it was marked private, but thanks for the tip about the post meta tab, I had overlooked that!
The custom field organizer was added in the Events Plugin customisation area. I specified the key without an underscore, but one has been added I can see…so perhaps I just need to create in ACF. I will try that too! Thanks.
-
AuthorPosts