Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1210109

    Hello,
    i need to use magazine to show a list of events from a plugin (Modern Events Calendar), everything works fine except one thing,
    the date shown is the creation date but I have to show the date of the event.
    I tried to use the solution described in https://kriesi.at/support/topic/events-date-in-magazine-element-not-creation-date/ but of course it can’t work because it was made for another plugin.
    I found this that maybe can help https://webnus.net/dox/modern-events-calendar/mec-hooks/ but unfortunately I’m a beginner and I don’t know how to take the data I need and put it in the right place.
    Can you help me?
    Greetings and thankyou!

    #1210601

    SOLVED! I was amazed by myself, I managed to fix the problem ( really: i’m a beginner ), I followed the solution described by Yigit in #post-768071 (Topic https://kriesi.at/support/topic/events-date-in-magazine-element-not-creation-date/ ) but the change to the magazine.php file is as follows:
    LINE 1228 $output .= “<time class=’av-magazine-time updated’ {$markupTime}>”.get_post_meta( $entry->ID, ‘mec_start_date’, true ).”</time>”;
    Now I just have to adjust the date format

    #1211102

    Hi labuonastrada,

    Glad you got it working for you! :)

    What format do you need it to be?

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1211202

    Victoria! I’m honored!
    I read many of your posts, thank you very much for the reply.
    I need the format dd / mm / yyyy or even better dd / (full name of month) / yyyy.
    Unfortunately I cannot handle the function well and I have not been able to do it.
    If you can help me I would be grateful. Thank you
    Best regards,
    Ranieri (labuonastrada)

    #1211242

    Hi labuonastrada,

    Try using:

    
    date('j F Y', strtotime(get_post_meta( $entry->ID, 'mec_start_date', true )))
    

    instead of get_post_meta( $entry->ID, ‘mec_start_date’, true )

    If you need further assistance please let us know.
    Best regards,
    Victoria

    • This reply was modified 4 years, 6 months ago by Victoria.
    #1211265

    Bingo! Now it works just as i wanted.
    I only replaced m instead of F because the site is not in English but that’s okay
    Thankyou very much!
    Best regards,
    Ranieri

    #1211267

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Show event dates instead of creation dates in the magazine element’ is closed to new replies.