I am trying to change the date so it appears at 2 days ago, or 30 minutes ago. I know I can use human time diff for this, but I don't know how to correctly add it to my site. Every time I try to add it I get a syntax error. I'm using the newspaper theme. I found the code that gets the date in my theme files, does anyone know how I can change the code so human time diff is included?
*This question isn't about why I was getting a syntax error. I know why, because I was adding in the code for human time diff wrong. I'm not the best at coding, which is why I'm asking for help to add it correctly.
code from theme
function get_date($show_stars_on_review = true) {
$visibility_class = '';
if (td_util::get_option('tds_m_show_date') == 'hide') {
$visibility_class = ' td-visibility-hidden';
}
$buffy = '';
if ($this->is_review and $show_stars_on_review === true) {
//if review show stars
$buffy .= '<div class="entry-review-stars">';
$buffy .= td_review::render_stars($this->td_review);
$buffy .= '</div>';
} else {
if (td_util::get_option('tds_m_show_date') != 'hide') {
$td_article_date_unix = get_the_time('U', $this->post->ID);
$buffy .= '<span class="td-post-date">';
$buffy .= '<time class="entry-date updated td-module-date' . $visibility_class . '" datetime="' . date(DATE_W3C, $td_article_date_unix) . '" >' . get_the_time(get_option('date_format'), $this->post->ID) . '</time>';
$buffy .= '</span>';
}
}
return $buffy;
}