Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Return a different date format in content
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 5 years, 6 months ago.
- AuthorPosts
- May 15, 2018 at 8:35 am #17858
Hi there,
Thank you for the great plugin already. With a lot of options there often comes a lot of questions. Here I have one, hope you can help me out.
I’m using your plugin in combination with the events calendar pro. I’m using the {_EventStartDate} value to add the start date of an event in de content of the search results. But this _EventStartDate is valued Y-m-d g:i:s and I would like to display them like: j F Y.
Is there a way I can do that in de results content box?
Attachments:
You must be logged in to view attached files.May 15, 2018 at 10:40 am #17865Hi!
The only possible solution there is to use a custom code to fetch the date, and then transform it to the desired format. Instead of the advanced field, I have constructed a custom code that may help.
Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!
That should do the trick.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 15, 2018 at 10:59 am #17866WOW! and what a quick respons 😀
I’ve set it up and it is working perfectly, thank you!
May 15, 2018 at 11:01 am #17867You 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.