Skip to content

Commit 00b5895

Browse files
committed
Don't display the updated date for blog posts but published date
1 parent 09f69df commit 00b5895

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

themes/osi/inc/template-tags.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
function osi_posted_on( $format = '' ) {
1515

1616
$time_string = '<time class="byline--date entry-date published" datetime="%1$s">%2$s</time>';
17-
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
18-
$time_string = '<time class="byline--date entry-date published updated" datetime="%3$s">%4$s</time>';
17+
18+
// Don't display the updated date for blog posts.
19+
if ( 'post' !== get_post_type() ) {
20+
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
21+
$time_string .= '<time class="byline--date entry-date published updated" datetime="%3$s">%4$s</time>';
22+
}
1923
}
2024

2125
$time_string = sprintf(

0 commit comments

Comments
 (0)