Best Premium and Free WordPress Themes › Forums › SuperMagPro › Date and thme format
- This topic has 15 replies, 4 voices, and was last updated 6 years ago by
acmesupports.
- AuthorPosts
- December 4, 2016 at 5:35 pm #11278
Riccardo
ParticipantHow to canghe tate and them format?
Thanks
December 5, 2016 at 2:49 am #11286acmesupports
ModeratorHello Riccardo,
You can change the time and date format from default WordPress Settings. By default, themes use the Date and Time settings in your WordPress > Settings. To change the date and time format used in the theme, you would go to WP Admin > Settings and select or enter your preferred format.
Hope, this will help to change your format.
Let us know, if you have any confusion.Regards
Acme SupportsDecember 12, 2016 at 3:38 pm #11461pyrius
ParticipantHi I have problem with date and time, I try to change in wp but its not working.
After lot time I find this:
<?php
/**
* Date display functions
*
* @since supermag 1.0.0
*
* @param string $format
* @return string
*
*/
if ( ! function_exists( ‘supermag_date_display’ ) ) :
function supermag_date_display( $format = ‘l, j. F Y.’) {
echo esc_html( date_i18n( $format ,current_time( ‘timestamp’ ) ) );
}
endif;and change date in format witch is ok for my but I do not know how to adjust time.
I whont this format 16:30:20 and now have 4:60:30 PM
Pleas help!
December 12, 2016 at 4:19 pm #11465acmesupports
ModeratorHello Pyrius,
Can you explain where you want to change the date format? In the header? Instead of editing code, have you tried the above method?
Please read this blog post for more help.
Hope, this will help you.Regards
December 12, 2016 at 4:38 pm #11466pyrius
ParticipantHi,
yes I try this method and dont work.
Yes I whot change format of time in header.
Can help?
December 13, 2016 at 2:46 am #11476acmesupports
ModeratorHello pyrius,
We are working on updates of SuperMagPro theme, you will get it worked on new updates. Just make sure you added the license on theme from automatic updates.Regards
December 18, 2016 at 2:55 pm #11602Riccardo
ParticipantDate in header option… How i change the format??? In italian the correcat are j F Y and in my wordpress admin is set correctly
ThansksDecember 19, 2016 at 12:58 am #11606acmesupports
ModeratorHello Riccardo,
You will find the codes inside theacmethemes/hooks/header.php
. Please customize the date format as your need. Please have a look on codex for code help.Regards
December 25, 2016 at 4:43 pm #11855Riccardo
ParticipantI can not change the date !!!
December 26, 2016 at 2:33 am #11880acmesupports
ModeratorYou will get the code snippet on
\supermag\acmethemes\functions.php
. Please look this screenshot for the code section. http://prntscr.com/dnw2wj Change the order ofl, F, J, Y
on you need. This will help to change the format on the header section.
Please try once.Regards
December 27, 2016 at 12:37 am #11921Riccardo
Participant\supermag\acmethemes\functions.php dont exist. i have supermagpro/acethemes/ but don show the file funtions.php
December 27, 2016 at 2:53 am #11943acmesupports
ModeratorHere is the exact location.
\supermagpro\acmethemes\functions\date-display.php
Customize the functions.
Note: Child Theme is recommended to customize theme. https://www.acmethemes.com/blog/2016/07/child-themes-and-its-importance/Regards
January 2, 2017 at 11:17 pm #12268Riccardo
ParticipantOk now it works !!!
How do instead to change the time format as in Italy without AM and PM?January 3, 2017 at 4:54 am #12270acmesupports
ModeratorYou have time format options in the backed. So, please check on Setting section. Read this blog post for more help.
Regards
January 31, 2017 at 3:29 pm #13356Francesco Crescimanno
ParticipantDear Sir,
I’m new to WP SuperMagPro.I’m trying to modify the Date and Time format from the original american format (weekday, month day, year hour:minutes:seconds AM/PM) to the Italian/Continental Europe format.
As per your suggestion I tried to modify the \supermagpro\acmethemes\functions\date-display.php function.
I have been able to modify the Date format from ‘l, F j, Y’ to ‘d F Y’, but, when I try to change the hour format in the function, changing ‘timestamp’ in ‘echo esc_html( date_i18n( $format ,current_time( ‘timestamp’ ) ) )’ to ‘H:i’, corresponding to the Italian time format with leading zeros, the YEAR in site displaying changes from current year INTO 1970!Why?
More if I try to add time format in the ‘d F Y’, resulting ‘d F Y H:i’ it works but it still displays also the American/British time format HH:MI:SEC AM/PM…
Could you, please help me in discovering how to correctly format Date and Time for Italian?
Thanks in advance for your help and courtesy,
Francesco Crescimanno - AuthorPosts
- The topic ‘Date and thme format’ is closed to new replies.