Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7700753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:49:16+00:00 2026-05-31T22:49:16+00:00

I am using a plugin which calls some posts grouped from a tag into

  • 0

I am using a plugin which calls some posts grouped from a tag into another post. I want to add human_time to these posts, but the method I’ve used below just calls the time for the parent post.

if ($date) { 
    $output .=  __('on ', 'posts-by-tag');
    $output .=  mysql2date(get_option('date_format'), $post->post_date) . ' at ' ;
    $output .=  mysql2date(get_option('time_format'), $post->post_date) . '<span class="the-times">' ;
    $output .=  human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago</span></p></div>' ;

The two middle outputs work properly, just the last one doesn’t. What would be the required changes on that last output to get it to work? I’m guessing it’s something to do with $post-> but I’m not sure of the right structure.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:49:17+00:00Added an answer on May 31, 2026 at 10:49 pm

    If this isn’t in “The Loop” you’ll have to target the post id in your get_the_time function like:

        $output .=  human_time_diff(get_the_time('U',$post->id), current_time('timestamp')) . ' ago</span></p></div>' ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jQuery autocomplete plugin from jQuery website calling the controller url which return
I've been using tomcat7-maven-plugin. I want to run my webapp which connects to the
When using the Groovy Jenkins plugin (not the Groovy Post Build Plugin, which is
I am using cluetip plugin which is great. I am populating the plugin using
I am using supersized jQuery slider plugin which change one on clicking NAV anchor
I am using the ajaxform() plugin, which so far is working well. However, my
I'm using a tutorial plugin - http://particlebits.com/code/jquery-tutorial/ which has this code attached to the
I'm currently using jQuery Cookies plugin, and depending on which side of the page
I've implemented a slideshow using the Cycle plugin, which is working in all browsers
I'm using the dataTables plugin On my sortable columns I want to replace the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.