0

I am using shapely theme and I would like to show post updated date instead of published date.

I tried to update this file, where I replaced this:

$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>';
        }

by this:

$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="updated" datetime="%3$s">%4$s</time>';
            }

After this update, there is no date in blog post.

closed as off-topic by bueltge, nmr, Michael, cjbj, Mayeenul Islam Nov 11 at 10:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I bet that the reason is CSS styles. Try to change class="updated" to class="updated published". As you can read here your question is off topic. – nmr Nov 8 at 13:32
  • Thanks! It works. How did you figure out this simple change can fix this? Sorry for off topic, but I hope this can be helpful if someone is looking for similar solution. You can post it as an answer. – Matt Nov 11 at 9:30

Browse other questions tagged or ask your own question.