Events Made Easy Forums How do I … Search Results

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #59345
    Anonymous
    Inactive

    Hi

    In the search results I am using the code provided in the FAQ to display event results. It is working great, but I would like to ask if there is a way to format the date differently.

    When I use:
    print "<b>Date:</b> ".$event['event_start_date']."";

    It returns: Date: 2019-01-26

    Is there an alternative date format?

    Also, is there a way to display the category from the even in this (should I use shortcodes here?)

    Thanks
    Jamie

    #59347
    Franky
    Keymaster

    You can use eme_localized_date on the date, it will format the date based on your wp settings. If you don’t like it, you can even add a second argument to it with your own formatting (php date formatters):
    eme_localized_date($event[‘event_start_date’]);
    or
    eme_localized_date($event[‘event_start_date’],”MY FORMAT”);
    There’s also a function eme_localized_time (for time formatting).

    #59368
    Anonymous
    Inactive

    Thanks Franky

    However, when I print that, it returns today’s date for all events, both start and end times.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top