Hallo zusammen,
ich möchte über meinen Beiträgen nicht nur das Datum an dem Dieser veröffentlicht wurde stehen haben, sondern auch die Uhrzeit. Den verantwortlichen Code habe ich in der Datei "template-tags.php" ausgemacht, ich bekomme es aber nicht hin die Uhrzeit anständig angezeigt zu bekommen.
Das hier ist der Code Schnippsel der meiner Meinung nach dafür verantwortlich ist:
Code
if ( ! function_exists( 'twentyseventeen_time_link' ) ) :/**
* Gets a nicely formatted string for the published date.
*/
function twentyseventeen_time_link() {
$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,
get_the_date( DATE_W3C ),
get_the_date(),
get_the_modified_date( DATE_W3C ),
get_the_modified_date()
);
// Wrap the time string in a link, and preface it with 'Posted on'.
return sprintf(
/* translators: %s: post date */
__( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
}
endif;
Alles anzeigen
Vielen Dank!
VG
Philip