change "posted on" to "updated on"

hi Movin,

is it possible to change “posted on” to “updated on” for my time stamps under the title for each post?

thanks

bel
belaroundtheworld.com

Hi Bel,

I hope you are well today and thank you for your question.

You can try achieving this by using the attached small plugin specially developed for you that contains some custom code.

Best Regards,
Movin

hi movin,

thanks this works. however, it doesn’t show the latest date that I updated on.

reference post here: http://belaroundtheworld.com/mount-titlis-switzerland-experience-snow-summer/. i updated this on 7 march.

kindly advise, thanks!

isabel

Hi,

Do you want to change the date? not just the text? In that case, use this function in your child theme’s functions.php

function activello_posted_on() {
	$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
		$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
	}

	$time_string = sprintf( $time_string,
		esc_attr( get_the_modified_date( 'c' ) ),
		esc_html( get_the_modified_date() ),
		esc_attr( get_the_modified_date( 'c' ) ),
		esc_html( get_the_modified_date() )
	);

	printf( '<span class="posted-on">'. __( 'Posted on', 'activello' ) .' %1$s</span>',
		sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
			esc_url( get_permalink() ),
			$time_string
		),
		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
			esc_html( get_the_author() )
		)
	);
}

Let us know,

Thanks,
laranz.

You’re a genius! Thanks guys!

One more problem: I want Google to show the date I updated on though, but currently it shows the time that I posted the article. (see attached)

Kindly advise.

It will take some time for the Google to reindex you site with updated post dates so please have a patience.

You can also ask Google to reindex it by submitting post URLs on the below page.

https://www.google.com/webmasters/tools/submit-url

Hi @mademoisellebel,

Glad it works :slight_smile:

Let us know if you have any other questions. If you’re happy with our service, don’t forget to review & rate us in WordPress [Activello] Reviews | WordPress.org :wink:

Thanks,
laranz.

thanks guys. you are amazing! i will!

You are always welcome here :slight_smile:

hello firends all information

@monaliza To help us keep support thread separates could you please create your own thread for your question here https://colorlibsupport.com/c/activello/ instead of replying on others thread as it makes the thread messy and hard to read.

If you want to you can also add reference of this thread in your newly created thread.

We would be more than happy to help you on your new thread.