⚠ The Black Friday 2020 WordPress Deals List Is Live!
Check It Out!

Published X Minutes/Days Ago On Oxygen Builder

Authored By: James LePage
Published On: October 24, 2020

Affiliate Disclosure: Some links on this website are affiliate links. We make commissions for purchases made through those links.

We only recommend items/tools that we've personally used and like.

Full Disclosure | FTC Statement

amazon elementor E book

If you're looking for an easy way to display a “this article was published 6 minutes ago” on your WordPress website built with Oxygen Builder, this article is for you.

This guide is specifically created for the Oxygen Builder repeater element, but it can definitely be expanded to easy posts, and even a non-Oxygen WordPress website.

First, insert your date into the repeater element by using the dynamic data aspect of the builder. Don't add any additional things to this date, keep it in its default format.

The only additional step that you need to take is inserting a code block, and pasting in this PHP.

The changes will not display in the builder, but on the front end of your Oxygen Builder website, the post date will show as “published 28 minutes ago”, or something like that.

Keep in mind; you can display “published x time ago” by using this method on any WordPress website, not specifically Oxygen. To do that, you would probably need to install a plugin called code snippets, and paste that PHP in there. Then, you may need to edit your theme files, make a child theme, or do some other back end alterations.

<?php function iso_post_time_ago () { return sprintf( esc_html__( '%s ago', 'textdomain' ), human_time_diff(get_the_time ( 'U' ), current_time( 'timestamp' ) ) ); } add_filter( 'get_the_date', 'iso_post_time_ago' );?>

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Notify of
Inline Feedbacks
View all comments
James LePage is the founder of Isotropic Design, a digital agency that builds WordPress websites. I read, write and design constantly!

Social Share

Request A WordPress Tutorial
Crafting Stunning Digital Appearances & Assets Out Of New York.
Get In Touch
Syracuse, NY | Charlotte, NC | New York, NY
© 2020 Isotropic, LLC
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram