This snippet replaces the default published date by the last post update’s date in your post metas. add_filter( ‘tc_date_meta’ , ‘display_the_update_date’); function display_the_update_date() { return sprintf( ‘<a href=”%1$s” title=”updated %2$s” rel=”bookmark”><time class=”entry-date” datetime=”%3$s”>%4$s</time></a>’ , esc_url( get_day_link( get_the_time( ‘Y’ ), get_the_time( ‘m’ ), get_the_time( ‘d’ ) ) ), esc_attr( get_the_modified_date(‘F j, […]
Function: get_the_modified_date()
2 posts
This simple snippet adds an update status after your post title in WordPress. It checks if the post has been updated since its creation and if this update is less than n days old. If the condition is verified, it adds an update status text after the title. In this example, […]