Removing comma from 'entry-date' in Twenty-Sixteen theme

I would like to remove the comma persent in the entry-date in the entry footer of Twent-Sixteen theme for styling purposes. (Month-Date, 2016) Looks like the date is coming from the function below. But I cannot figure out from where the comma after Month-Date comes in? Please help…

function twentysixteen_entry_date() {
    $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';

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

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

    printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
        _x( 'Posted on', 'Used before publish date.', 'twentysixteen' ),
        esc_url( get_permalink() ),
        $time_string
    );
}
endif;

Did you try the custom date settings in the dashboard: Settings > General > Date Format?

1 Like

WebMachine, ahh…it is that simple eh! Thank you …your answer helped! :grinning:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.