Have you changed the date format under the Settings > General menu from within your Dashboard?
l, j FY would create Sunday, 20 November2016
Hope this helps.
To ThemeSumo: unfortunately the WordPress settings> General date format chosen doesn’t change the date format in the theme header area.
Best regards
Okay, you can modify this date format using a Child Theme, add this to the functions.php file:
function colormag_date_display() { ?>
<div class="date-in-header"><?php
echo date_i18n('l, j FY'); ?>
</div><?php
}
The above function will overide the default function that displays the date in the header, hope this helps.
Okay, you can modify this date format using a Child Theme, add this to the functions.php file:
function colormag_date_display() { ?>
<div class=”date-in-header”><?php
echo date_i18n(‘l, j FY’); ?>
</div><?php
}
The above function will overide the default function that displays the date in the header, hope this helps.
Sorry but this doesn’t help. Where should I place this code directly?
You need to use a Child Theme, this way you can use its functions.php file to modify a theme function.
You can copy/paste the code I gave you above into the file and it should work without any issues as I tested it on my own environment.
If you modified a theme file directly without using a child theme, you would lose all custom code changes the moment you update the theme in the future. The function we’re going to override resides within the /inc/functions.php file (line 514) of the colormag theme.
Hope this helps.
-
This reply was modified 9 years, 4 months ago by
ThemeSumo. Reason: typo
Hello
I have tried the code above ` function colormag_date_display() { ?>
<div class=”date-in-header”><?php
echo date_i18n(‘l, j FY’); ?>
</div><?php
}`
on child theme. Good. But where can i change the Latest words with something like this :
Infos :
Thank you.
Nb: i am on localhost in developping the website.