How to add "Time Ago" in Twenty Ten?
-
Hi,
I want to add the “Published <time ago>” instead of the regular date/time format that is being used by the Twenty Ten theme! Any suggestions please. I get errors when I add:
<?php echo time_ago(); ?>
after using the function:
function time_ago( $type = 'post' ) { $d = 'comment' == $type ? 'get_comment_time' : 'get_post_time'; return human_time_diff($d('U'), current_time('timestamp')) . " " . __('ago'); }
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘How to add "Time Ago" in Twenty Ten?’ is closed to new replies.