Thanks, I fixed it.
For somebody else with the same issue:
- From hueman/parts folder copy the file single-author-date.php
- Then edit the file deleting all the content.
- Paste the file in the folder parts of your hueman child theme.
- Use the plugin code snippets and paste the following code:
If your site is in English:
function wpb_last_updated_date( $content ) {
$u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 86400) {
$updated_date = get_the_modified_time('F jS, Y');
$updated_time = get_the_modified_time('h:i a');
$custom_content .= '<p class="last-updated">Last updated on '. $updated_date . ' at '. $updated_time .'</p>';
}
$custom_content .= $content;
return $custom_content;
}
add_filter( 'the_content', 'wpb_last_updated_date' );
if your site is in Spanish:
function wpb_last_updated_date( $content ) {
$u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 86400) {
$updated_date = get_the_modified_time('j \d\e\ F \d\e\ Y \|\ g:i a ');
$updated_time = get_the_modified_time('h:i a');
$custom_content .= '<p class="last-updated">Actualización '. $updated_date .'</p>';
}
$custom_content .= $content;
return $custom_content;
}
add_filter( 'the_content', 'wpb_last_updated_date' );
For styling, didn’t work the style.css from the child theme, so I paste the following code in Customizer< advance options<Additional CSS:
`.last-updated {
font-size: small;
text-transform: uppercase;
}
This codes slightly modified (for Spanish) are from this page:
https://www.wpbeginner.com/wp-tutorials/display-the-last-updated-date-of-your-posts-in-wordpress/