Parse error: syntax error, unexpected T_STRING
-
Hi there,
I’ve had such a hard time with this one. I’m trying to adjust this:
$time_string = ‘<time class=”entry-date published” datetime=”%1$s”>%2$s</time>’;
to this
$time_string = ‘<?php echo relative_time(get_the_time(‘U’), current_time(‘timestamp’)) . ‘ ago’; ?>’;
I’ve got coding in the function.php to grab how long ago the post was posted, but I the theme doesn’t have the template tags very easily done so I can’t simply replace the normal <?php the_time(); ?>
Let me know if you have any questions. Your help is much appreciated!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Parse error: syntax error, unexpected T_STRING’ is closed to new replies.