skip to Main Content

Alter the Blog Post Published Date to Last Modified Date

Important:You can now do this via the Customizer by default since Total 5.4.6
function myprefix_entry_single_meta_sections( $sections ) {
    if ( is_array( $sections ) && isset( $sections['date'] ) ) {
        $sections['date'] = function() {
            $icon = wpex_get_theme_icon_html( 'clock-o' );
            echo  $icon . 'Updated on ' . esc_html( get_the_modified_date( get_option( 'date_format' ) ) );
        };
        return $sections;
    }
}
add_filter( 'wpex_blog_entry_meta_sections', 'myprefix_entry_single_meta_sections' );
add_filter( 'wpex_blog_single_meta_sections', 'myprefix_entry_single_meta_sections' );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top