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*

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #96647
    #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!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.