badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Reply To: How can i put “posted x minutes ago on my posts?

#96717

Hi there,

To put posted x minutes ago on the articles just go to theme main directory inc > functions.php on line no: 124 there you will see below line of code:

$time_string = get_the_time( get_option( 'date_format' ) );

replace the above line of code with below one:

$time_string = human_time_diff( get_post_time('U'), current_time('timestamp') ) . " " . __('ago', 'newscard');

Note: We recommended you to create a child theme for customizing the theme main code so that the customization code won’t lost whenever you update the theme to the new version. You can simply override the function code with above line of code into your chid theme function.php file.

Thank you!