Styling the "time ago" function

Posted in: Newspaper
Post count: 23

Have the time ago functioning within the FlexBlock1 module … seems to be perfectly fine.

Except the styling is off and I know just enough about all this to be dangerous and can’t figure out how to style that particular part.

Using:

<?php echo human_time_diff( get_the_time(‘U’, $post_id), current_time(‘timestamp’) ) . ‘ ago’; ?>

Post count: 35449

Hi,

Maybe try the solution from this topic – https://forum.tagdiv.com/topic/implementing-the-time-ago/
I remember it worked at the time. In the latest update we introduced a last modified option for the modules – http://prntscr.com/mujoi7 related topic -> https://forum.tagdiv.com/topic/updated-posts-in-the-home-slider/
But a time ago would have to be implemented manually, there is no setting for it at the moment.

Thanks

Post count: 23

Thank you for the reply. Maybe I wasn’t clear … it is working and this is simply asking where to place styling for it. It does not injerit the styling from the Meta Info option in the module. Mainly linespacing.

Post count: 35449

Hi,

Notice that what you want to achieve is a custom work for an option that our theme already have it ( time ago options ) for post and modules/blocks.
Your time ago need to have some class set like those from td_module.php ( this is the parent module for all modules ) -> https://www.screencast.com/t/9qQ3glTzytVF you need to add to your code those classes.

Thank you for your understanding!

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