Change the post date to display last edited, not date created

Posted in: Newspaper
Post count: 8

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>';
}

Post count: 35449

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.

Post count: 81

I am not able to find it!!

Post count: 35449

Hi,

In Newspaper v9.7.3 the td_module_single_base.php was moved in tagDiv Composer plugin, you can find it in -> wp-content/plugins/td-composer/legacy/common/wp_booster/td_module_single_base.php

Hope this will help you!
Thanks.

Post count: 15

this helps

Post count: 81

How to not show “Last Modified label/text” on blocks?

Post count: 35449

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!

Post count: 81

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”.

Post count: 35449

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!

Post count: 81

Hi, As I said I want to show the date and want to take away the label – “Last Updated:”

This code removes the actual date as well.

Post count: 35449

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!

Viewing 11 posts - 1 through 11 (of 11 total)
The forum ‘Newspaper’ is closed to new topics and replies.