Jump to content
Sign in to follow this  
ColinMcLean

Date format in Post Subheader

Recommended Posts

ColinMcLean    0
ColinMcLean

I've enjoyed working out every other little 'wrinkle' to date as I've set up my site but I'm currently at a dead end on one, no doubt, very simple matter. I've amended the preferences for UK style dates (ie. 5.11.09 rather than 11.05.09) wherever I could find that option but the subheader on each post still reads '11.05' for example, rather than '5.11'. That's what I'm looking to change. It's bound to be a straightforward line that needs amending .. but I need a steer please. Anybody? And thanks.

Share this post


Link to post
Share on other sites
Andrew    201
Andrew

good catch. Another IBP user, Ronald, has brought that up a couple of times recently. Most WP themes use a simple "the_time('F jS, Y')" for their post time formatting (including the default theme) I did a little digging and found out how to do this using WP's default time formatting setting. We've added this featured but haven't yet updated with it yet. so until then, here is how you can fix: in the file '_posts.php' you need to replace this code:

<?php the_time('m.d.y'); ?>
with this code:
<?php the_time(get_option('date_format')); ?>

Share this post


Link to post
Share on other sites
ColinMcLean    0
ColinMcLean

Just what I needed, and thank you!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×