Jump to content
Sign in to follow this  
rpacker

How to add time to the date on a post

Recommended Posts

rpacker

Is there a simple way to add the precise time, as specified in settings, to the date that appear with each post?


Randall Packer

Multimedia Artist & Educator

http://www.randallpacker.com

Share this post


Link to post
Share on other sites
catrina
If you don't mind the time going below the author and date, it's possible with a hook. The code that generates the timestamp is: [code][/code] ^ This is the code that goes inside the hook (the hook you should use is one of the metabar hooks listed in Template Setup).

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Jenny
I see you rejected Catrina's answer but didn't explain why so I will add some addition information that may help. Please view this post: http://www.pagelines.com/forum/discussion/14810/help-formatting-post-date-to-time-ago#Item_2 In the future, it is helpful to explain [i]why[/i] an answer didn't help so we have a better idea about what you're looking for. Thanks!

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
rpacker
Oh sorry, I didn't understand her reply. I was hoping there might be a simpler custom CSS solution rather than digging in and writing a hook. It seems like such a small thing. And besides, in the Wordpress settings, you can select the time format but it doesn't display unless you edit a php file?

Randall Packer

Multimedia Artist & Educator

http://www.randallpacker.com

Share this post


Link to post
Share on other sites
Rob
Russell, It took me ages to discover that the WP settings for time actually affect the way WP records time in the database, rather than how it displays it in posts or pages. However, if your WP settings for time are set the way you want to display them, as Jenny and Catrina point out, you can grab that data and adjust your site per your wishes. Unfortunately, because it's calling from the database, CSS, which is only styling, won't be effective.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Jenny
The date/time display has nothing to do with CSS aside from the font, spacing, etc. Date/time is a PHP function of Wordpress.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

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  

×