Hi Edward,
Thanks for choosing Challenger!
I would recommend using this plugin to add that feature: https://wordpress.org/plugins/wp-last-modified-info/
Hi Ben,
Thank you for replying to my question.
I mean I need a solution that adds this line to the post byline above the article, not a solution inserted in the post, as this plugin does.
I know I can change the post date by changing ‘get_the_date’ to get_the_modified_date’, but I would like to add the text ‘last updated on’ to that line.
Thnx!
Okay this can be done with a child theme then. You can download a starter child theme for Challenger here: download Challenger child theme.
Create a folder called “content” in the child theme and copy the “post-byline.php” file from the “content” folder in Challenger into your child theme’s “content” folder. You’ll find the date variable set on line 14. You can add the text to the beginning of that variable, like this:
$date = 'Lasted updated on: ' . date_i18n( get_option( 'date_format' ), strtotime( get_the_modified_date() ) );
That also uses the get_the_modified_date() instead of get_the_date().
-
This reply was modified 7 years, 4 months ago by
Ben Sibley.
Thanks Ben, I will try this.
You’re welcome. Glad I could help!