EDITING THEME FILE TO EDIT TIME TO TIME AGO FORMAT

Posted in: Newspaper
Post count: 11

I just upgraded my newspaper theme and i wish i never did. from my former version of the newspaper, i was able to the the time format using the following code on both my desktop and mobile version of the theme

<?php
$time = human_time_diff(get_the_time(‘U’, $this->post->ID),

current_time(‘timestamp’));
$pos = strpos($time, ‘months’);
if ($pos>0) {echo ‘<div class=”myclass”>’ . $this->get_date ( show_stars_on_review, false) . ‘</div>’;}
else {echo ‘<div class=”myclass”>’. $time . ‘ ago’. ‘</div>’;}
?>

and styling it with the div class that i called from the time code.

However, with this new theme, i am unable to find out which particular module to edit for front page, single post page for both desktop and mobile. Kindly help please.

Post count: 35449

Hi,

When you’ll be updating to the Newspaper 9.7 version, you’ll need to activate the tagDiv Composer to keep the Newspaper theme functionality you’ve previously used.
Otherwise, you will have basic WordPress functionality, complying with Envato WordPress Requirements – https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements

You can use the modified date option that provide our theme to display each date you want on blocks, you can use this option, or use the old one with publish 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

Also the modified date on post can be set with tagDiv Composer on single post template -> https://www.screencast.com/t/eYkeLqbCqV -> https://www.screencast.com/t/3qCSo9Nxtt

Thank you for your understanding!

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