Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search settings – Custom field date picker issue
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years ago.
- AuthorPosts
- April 28, 2020 at 11:51 pm #26979
Hello,
Loving Ajax…! Very powerful tool.
Do have a quick question though, I’m trying to apply a filter on dates I’ve added to posts with a post submission for plugin (Buddyforms)…
I can get the dates in the search results using description field {start-date}… however when I hook up the settings filter on custom field “start-date” with date picker I just can’t get it to work… have tried different combinations of date and can’t figure it out :/
I’m using the search index, have added “start-date” to the index, so don’t think it’s that…?
Ajax search example with date picker – POSTS – MOST POPULAR
Example of search on page with date picker (under Most Popular tab): https://smilingguru.com/free-content/
Example of post with “start-date”: https://smilingguru.com/the-buddhist-path-of-training-the-mind-2-week-starting-mon-27th-april/
Hope that’s clear, would really appreciate your help 🙂
Thanks,
MattApril 29, 2020 at 8:20 am #26987Hi Matt,
Thank you for the details, it helps a lot!
The issue seems to be, that the field is actually an “ACF DateTime” field, and you selected “ACF Date” field for the filter – they are often mistaken, but very different fields. Changing the filter type back to the default will do the trick: https://i.imgur.com/6ih3at4.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 29, 2020 at 9:17 am #26989Hi Ernest,
Thanks for your quick reply. 🙂
I have tried with both the default and ACF date… no joy… any ideas?
Best,
MattAttachments:
You must be logged in to view attached files.April 29, 2020 at 1:44 pm #27000Hi,
That is strange. I looked up the configuration, I don’t see that field anymore in the post editor. On the ACF options, there is only one field in the bin, and that is “start_date” and not “start-date”.
Best,
I queried that weird “start-date” field value via FTP, and it does not contain the date in MySQL datetime format, but as a custom date format, which is not comparable. ACF does not do that, they use a display value, but the field is always stored in the correct datetime format.
I recommed creating an ACF date or datetime field, and using that, that should work all right. The one you created and have in the bin is perfectly fine, but make sure to change the meta value on the filter to “start_date”.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 29, 2020 at 8:17 pm #27018Thanks for this Ernest! I was using this weird start date as it came from Buddyforms and hooked into front end of post easily… I’m new to all this! Im using acf now, but struggling to get the fields to display in the posts… i’ll work it out! it works perfectly with ajax now, appreciate the help!
🙂
April 30, 2020 at 8:03 am #27021You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.