Last Modified Post (Updated)

Posted in: Newsmag
Post count: 70

Hello,

If we have an important event on our site, we will update our post several times during the week.
It is very important to us to show in frontend that post is updated, and to show time when is updated.

Is is possible to show post update date here: http://prntscr.com/qnx4lz ?

We have foun this, mabey this can help with theme integration:

<?php

function awd_post_modified($d = '') {
if ( '' == $d )
$the_time = get_post_modified_time(get_option('date_format'), null, null, true);
else
$the_time = get_post_modified_time($d, null, null, true);

/**
* Filter the date a post was last modified.
*
* @since 2.1.0
*
* @param string $the_time The formatted date.
* @param string $d PHP date format. Defaults to value specified in
* 'date_format' option.
*/
return apply_filters( 'awd_post_modified', $the_time, $d );
}
add_shortcode( 'post_modified', 'awd_post_modified' );

//* Add Post Modifed Date
add_filter('the_content', 'awd_modified_date');

function awd_modified_date($content) {

$awd_modified_date= '<span style="font-style:italic; font-weight:bold;text-align:center;">(Посљедње ажурирање: [post_modified])</span>';

if(is_single() && !is_home()) {
$content = $awd_modified_date.$content;
}
return $content;
}

?>

Thanks a lot.

Post count: 35449

Hi,

If you have the Newsmag v4.9.1 you can use this option -> https://i.imgur.com/rDod6l1.png -> https://i.imgur.com/oUYeLIN.png

Thank you!

Post count: 12

Hi,
What about newspaper? How can I do this?
Thans,

Post count: 35449

Hi,

This part of forum is for the Newsmag theme -> https://i.imgur.com/LuD2vpg.png
For Newspaper -> https://i.imgur.com/UNtebq3.png
Also This option on Newspaper can be use on single post templates, this will be apply on all posts that have set that single post template from tagDiv Cloud Library, for modules we have only the modified date, please check the settings from theme panel -> https://www.screencast.com/t/H7CFzAKVw7 set the option with tagDiv Composer-> https://www.screencast.com/t/OAoAK9oUu make update on post -> https://www.screencast.com/t/vcQoLkQByxc now check the date of that post -> https://www.screencast.com/t/sKbLrp1jz also you can can sort after modified date -> https://www.screencast.com/t/VSePr63B

Thank you!

Post count: 12

Ok, thanks!

Post count: 13

There is no option to enable modified date https://imgur.com/a/5tKfnL4

Post count: 35449

Hi ir,

Just make sure that you are using the latest theme version, Newsmag 4.9.2 -> https://i.imgur.com/rxQRDPU.png

Thank you!

Post count: 13

I’m using Newspaper’s latest version.

Post count: 35449

Hi ir,

Sorry you posted in Newsmag forum, on Newspaper the modified date on posts can be set using tagDiv Composer on single post template from tagDiv Cloud Library.
-> https://www.screencast.com/t/eYkeLqbCqV -> https://www.screencast.com/t/3qCSo9Nxtt
Also you can use the modified date on blocks -> https://i.imgur.com/M8EhqKW.png and you can filter after this setting -> https://www.screencast.com/t/VSePr63B

Thank you!

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