...

View Full Version : change order



OGGordon
01-31-2012, 04:58 PM
Hey guys,

I am currently having this structure displayed on my posts:

"Admin wrote Article blablal 35 minutes ago."

I want the "ago" before "35 Minutes". This is the code:


<abbr title="<?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>"><?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . __(' ago', 'themes');

How can I place the word "ago" before "35 minutes"?

BluePanther
02-01-2012, 12:41 AM
Hey guys,

I am currently having this structure displayed on my posts:

"Admin wrote Article blablal 35 minutes ago."

I want the "ago" before "35 Minutes". This is the code:


<abbr title="<?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>"><?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . __(' ago', 'themes');

How can I place the word "ago" before "35 minutes"?

Why would you want to?

Inigoesdr
02-01-2012, 02:06 AM
<abbr title="<?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>"><?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . __(' ago', 'themes');

How can I place the word "ago" before "35 minutes"?

Just switch the order:

<?php echo __(' ago', 'themes') . human_time_diff(get_the_time('U'), current_time('timestamp'));

OGGordon
02-01-2012, 06:57 AM
thanks, I switched it the wrong way and it kept showing an error, but yours worked.

I have a german website, grammatically it's correct to use the german word for "ago" before the timestamp :).

BluePanther
02-01-2012, 05:57 PM
thanks, I switched it the wrong way and it kept showing an error, but yours worked.

I have a german website, grammatically it's correct to use the german word for "ago" before the timestamp :).

Ah, interesting :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum