You can do:
echo str_replace('mins', 'minutes', human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago');
Update:
The same using filter as suggested:
add_filter('human_time_diff', 'new_human_time_diff', 10, 2);
function new_human_time_diff($from, $to) {
// remove filter to prevent the loop
remove_filter('human_time_diff', 'new_human_time_diff');
$timediff = str_replace('mins', 'minutes', human_time_diff($from, $to) . ' ago');
// restore the filter
add_filter( 'human_time_diff', 'new_human_time_diff', 10, 2);
return $timediff;
}
echo human_time_diff(get_the_time('U'), current_time('timestamp'));
Related Posts:
- Changing the post date and time with function
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Update all comments time to random dates?
- Force the “Choose from the most used tags” meta box section to always be expanded
- Calling Different Custom Post Timestamps in a table
- Change all author links in Blog roll
- Using system date format
- saving/reading custom field value does not work – no value gets POSTed
- Set a post expiration and delete a post when expirate
- Display Updated Date Instead of Published Date
- How do you update post date (year only) in a separate custom field?
- How to hide meta from search result only on pages?
- Check if user has avatar
- Run function after post is updated
- date issue with category post retrival
- Cannot retrieve a custom RSS field from posts
- Saving custom fields to a custom taxonomy
- Order posts alphabetically: how to set order=asc in mysql query?
- How to get date of post when using wp_get_recent_posts()?
- How to automate featured posts number? [duplicate]
- Worpdress function for difference dates
- Customize rel=canonical tag for single blog post
- How to I retrieve the ID from the Posts page?
- How to save meta checkbox WordPress
- disable Tab post on nav-menus page (Admin)
- Adding bootstrap classes to video shortcodes
- How to calculate the average of a post meta value(Numeric) of a specific author
- Every second post different class in blog view
- Changing default WP-Site creation date
- Format latest/newest post differently
- is_page Funtion for Posts ?
- Is there any way to tell when wp_postmeta has been updated?
- Post type no single page
- Get post meta retrieving wrong value
- Adding a user’s ID behind the tag ref link address
- How to get posts published on the latest date?
- wpColorPicker – problem with implementation to post meta
- The_excerpt() doesn’t parse – how to change that?
- How to only publish posts with image in it
- Isn’t the way posts are displayed very unefficient?
- Add custom text automatically on each post
- How to check in functions.php if there is data in a WP_Query?
- Change post author without using wp_update_post()
- if in category but only with post meta
- restrict incrementation of post vies count when refreshing the page
- What date to use as a post date? date_gmt or modified_date_gmt
- Defined function isn’t showed on page
- wp_query with ajax
- Update post meta within save_post action
- How to update all posts at once?
- WordPress 302 Redirect to Random Product/Post/Page
- Display post number by category
- Updating post meta for checkbox
- Saving Post Data in Another Database
- Assigning Two Different Post Dates For Single Post
- Getting Whitescreen when publishing a post [closed]
- Get post by tag
- Add code to a specific post’s content
- Related Posts function not working
- Custom permalink for each post
- the_content() Not Grabbing All Content
- Modify this line to give alternate format date?
- How can I tell if a post has been published at least once?
- Un-highlight Blog Menu Item when Category Menu Item is Selected
- How to show different timestamp
- Post: how to set created date after post has been published [closed]
- Is there a way getting post fields using `transition_post_status`
- Automatic blog page with custom design [closed]
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- Add “Posted on” to post date
- Auto update post title and slug when post status is changed
- Add multiple meta keys to a post at once
- Show number of posts by logged in user
- How does WP decide how to display a page
- Related Posts: Changing Function For Posts Per Page
- wp_query if have posts show date but not in loop
- Retrieving posts by their date and category
- When sending a newsletter -not with wordpress- the server has 100% cpu [closed]
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- Query function not executed between element [closed]
- Insert data from custom created PHP page into wp_postmeta table
- Optimize CPT-function with a loop
- Adding a meta box to determine the sidebar [closed]
- Date is wrong on ‘all posts’ page
- The loop starting at a certain ID
- Getting an extra post’s meta data?
- Simple Custom Metabox Not Saving
- Same post appears in related Posts?
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Get post category as a separate string and url
- Plotting posts on a graph
- Have h2 tag not show up if there are no blog posts
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Making a wordpress page print friendly
- Order posts by date
- Get timestamp of latest post in C#
- Help on conditional statement to accompany wp_insert_post function please?
- How to implement a WordPress comments function?
- How to add content above footer in posts from specific category
- Get post publishing date from within custom HTML block