In 9.7.2 how can we change the post date to display last edited, not date created? We previously did this in td_module_single_base.php, as below, but that file appears no longer to exist.
Line 302 -> 307
Old
if (td_util::get_option('tds_p_show_date') != 'hide') {
$td_article_date_unix = get_the_time('U', $this->post->ID);
$buffy .= '<span class="td-post-date' . $td_post_date_no_dot . '">';
$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>';
}
Changed
if (td_util::get_option('tds_p_show_date') != 'hide') {
$td_article_date_unix = get_the_modified_time('U', $this->post->ID);
$buffy .= '<span class="td-post-date' . $td_post_date_no_dot . '">';
$buffy .= 'Last Updated: <time class="entry-date updated td-module-date' . $visibility_class . '" datetime="' . date(DATE_W3C, $td_article_date_unix) . '" >' . get_the_modified_time(get_option('date_format'), $this->post->ID) . '</time>';
$buffy .= '</span>';
}
-
This topic was modified 7 years by
rjmiddleton.
-
This topic was modified 7 years by
rjmiddleton.
-
This topic was modified 7 years by
rjmiddleton.
Hi,
In Newspaper v9.7 the td_module_single_base.php file can be found in wp-content/themes/Newspaper/includes/wp_booster/td_module_single_base.php
-> https://www.screencast.com/t/tpr24qJFdyD8
Hope this will help you!
Thanks.
Hi @akshem,
If you are referring to the modified date from those blocks -> https://www.screencast.com/t/78TqSFH0A then you can checange that text from Theme Panel>Translation and search for “Modified date” -> https://www.screencast.com/t/VXYpgArnoa in order to remove that text just set a blank space in that field -> https://www.screencast.com/t/xmVxz37PCabx
Thank you!
Yes, that worked for changing the text.
What if I want to get rid of the complete text on certain blocks while keeping them for others.
For instance on this URL – https://www.techuntold.com/
In the featured block and the one below it, we don’t want to show “Last Updated” label and while showing it for the block “Useful Resources”.
Hi,
This can be achieve only using css like this one
http://prntscr.com/oibw8k
.td_block_big_grid_1 .td-post-date, .td_block_3 .td-post-date {
display: none
}
The code need to be set in theme panel > Custom code> Custom css.
Hope this will help you to achieve what you need.
Thank you!
Hi,
Unfortunately there is no settings in theme for this and this is not very easy to achieve, but I will try to help you, please try this custom css
.td_block_big_grid_1 .td-post-date, .td_block_3 .td-post-date {
overflow-x: hidden;
line-height: 1.4;
text-indent: -74px;
}
Hope this will help you!
Thank you!