 
	
		Tagged: event date, magazine element
- 
		AuthorPosts
- 
		
			
				
May 5, 2020 at 10:51 pm #1210109Hello, 
 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!May 7, 2020 at 5:59 am #1210601SOLVED! 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 formatMay 8, 2020 at 5:46 pm #1211102Hi 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, 
 VictoriaMay 8, 2020 at 8:58 pm #1211202Victoria! 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)May 8, 2020 at 9:46 pm #1211242Hi 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 5 years, 5 months ago by Victoria. 
 May 8, 2020 at 10:33 pm #1211265Bingo! 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,
 RanieriMay 8, 2020 at 10:35 pm #1211267Hi, I’m glad this was resolved. If you need additional help, please let us know here in the forums. Best regards, 
 Jordan Shannon
- 
		This reply was modified 5 years, 5 months ago by 
- 
		AuthorPosts
- The topic ‘Show event dates instead of creation dates in the magazine element’ is closed to new replies.
