Title: Replace post published date with Last updated date
Last modified: August 31, 2016

---

# Replace post published date with Last updated date

 *  Resolved [sameerpanda](https://wordpress.org/support/users/sameerpanda/)
 * (@sameerpanda)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/replace-post-published-date-with-last-updated-date/)
 * Hello Sparkling team
 * I want to replace the published date with last updated date. Can anyone help 
   me?
 * I found this code in inc folder, shall I edit here or what?
 *     ```
       /**
        * Prints HTML with meta information for the current post-date/time and author.
        */
       function sparkling_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_date( 'c' ) ),
       		esc_html( get_the_date() ),
       		esc_attr( get_the_modified_date( 'c' ) ),
       		esc_html( get_the_modified_date() )
       	);
   
       	printf( '<span class="posted-on"><i class="fa fa-calendar"></i> %1$s</span><span class="byline"> <i class="fa fa-user"></i> %2$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() )
       		)
       	);
       }
       endif;
       ```
   
 * I also want to add some text before date as “Last updated on”. Please help me

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Free WP TP](https://wordpress.org/support/users/freewptp/)
 * (@freewptp)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/replace-post-published-date-with-last-updated-date/#post-6955645)
 * Hi Sameer Panda,
 * I hope you are well today and thank you for your question.
 * You can try achieving this by adding the following CSS code in the Custom CSS
   option of the latest version of Sparkling theme on the below path.
 * Admin Area -> Appearance -> Customize -> Sparkling Options -> Other -> Custom
   CSS
 *     ```
       .entry-meta .posted-on a:before {
           content: "Last Updated on ";
       }
       .entry-meta time.entry-date.published {
           display: none;
       }
       .entry-meta time.updated {
           display: inline-block;
       }
       ```
   
 * Best Regards,
    Movin
 *  Thread Starter [sameerpanda](https://wordpress.org/support/users/sameerpanda/)
 * (@sameerpanda)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/replace-post-published-date-with-last-updated-date/#post-6955657)
 * Thanks Worked perfectly.
 *  [Free WP TP](https://wordpress.org/support/users/freewptp/)
 * (@freewptp)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/replace-post-published-date-with-last-updated-date/#post-6955758)
 * You are most welcome here 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Replace post published date with Last updated date’ is closed to new 
replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sparkling/2.4.11/screenshot.png)
 * Sparkling
 * [Support Threads](https://wordpress.org/support/theme/sparkling/)
 * [Active Topics](https://wordpress.org/support/theme/sparkling/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sparkling/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sparkling/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Free WP TP](https://wordpress.org/support/users/freewptp/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/replace-post-published-date-with-last-updated-date/#post-6955758)
 * Status: resolved