How to change date format?

February 2013 WordPress Theme
GK User
Thu Nov 14, 2013 6:26 pm
Hi,

How can I change the date format for the Magazine theme?

I want to do it from F j, Y (November 14, 2013) to j F , Y (14 November, 2013) because this way it makes sense in my site's language (I have already done the translation).

I don't see a date format on the theme's settings, and the Wordpress date format setting is ignored by the theme.

Thanks

Angelos Kyritsis
User avatar
Fresh Boarder

GK User
Thu Nov 14, 2013 8:00 pm
Could you post urls to places where date is used in wrong format? (eg link to blog index, single article, category index etc) on your site?
User avatar
Moderator

GK User
Thu Nov 14, 2013 9:08 pm
Cyberek wrote:Could you post urls to places where date is used in wrong format? (eg link to blog index, single article, category index etc) on your site?


This is a sample article.
http://www.pcsteps.gr/pcsteps/winter-storm-brutus/
User avatar
Fresh Boarder

GK User
Sun Nov 17, 2013 11:13 am
Please edit this file:
/wp-content/themes/Magazine/gavern/helpers/helpers.layout.fragments.php

Edit this code:
Code: Select all
             <time class="entry-date" datetime="<?php echo esc_attr(get_the_date(DATE_W3C)); ?>">
                <?php echo esc_html(get_the_date('F j, Y')); ?>
             </time>


and replace "F j, Y" with your definition.
User avatar
Moderator

GK User
Sun Nov 17, 2013 2:08 pm
Thanks a lot, it worked :)
User avatar
Fresh Boarder

GK User
Sun Nov 17, 2013 2:48 pm
The date format editing is not available to everybody because messing with it might make layout break - as there is not a lot of space for the date in article header.
User avatar
Moderator

GK User
Sun Nov 17, 2013 6:33 pm
Yes, I understand. If it didn't look weird in my mother language, I would have left it alone.
User avatar
Fresh Boarder

GK User
Mon Nov 18, 2013 5:39 pm
Ok, is there anything more I can help in this topic?
User avatar
Moderator

GK User
Mon Nov 18, 2013 6:11 pm
No, that will be all, thank you
User avatar
Fresh Boarder

GK User
Wed Nov 20, 2013 10:45 am
Ok, then I'm closing the topic.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.