Return a different date format in content

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 Ernest Marcinko 5 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17858
    opwolken
    opwolken
    Participant

    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.
    #17865
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #17866
    opwolken
    opwolken
    Participant

    WOW! and what a quick respons 😀

    I’ve set it up and it is working perfectly, thank you!

    #17867
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.