[Resolved] Change published to update date

Home Forums Support [Resolved] Change published to update date

Home Forums Support Change published to update date

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #306866
    Deniz Akay

    Hi,

    I want to replace published date with the last updated date on post pages. Normally the code looks like this:

    Last updated on <time datetime="<?php the_modified_time('Y-m-d'); ?>"><?php the_modified_time('F jS, Y'); ?></time>

    I couldn’t find which file I should change. Thanks.

    #306890
    Tom
    Lead Developer
    Lead Developer

    You could try this CSS:

    .posted-on .updated {
        display: inline-block;
    }
    
    .posted-on .published:not(:last-child) {
        display: none;
    }
    #306903
    Deniz Akay

    I used “posted-on” (not post-on) on both CSS lines and it worked. Thanks.

    How can I add the words “Last updated:” before update date?

    #306994
    Tom
    Lead Developer
    Lead Developer

    Just edited my CSS above – can you give it another try?

    #306995
    Deniz Akay

    Thanks, it works. How can I add the words “Last updated:” before update date?

    #307079
    Tom
    Lead Developer
    Lead Developer

    You could try:

    .posted-on .updated:before {
        content: "Last updated: ";
        position: relative;
    }
    #307129
    Deniz Akay

    That’s great! Many thanks for your support.

    #307352
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

    #1744337
    Andrew

    Hey guys

    I added this code (below) to my CSS as I only want to see ‘Last updated <DATE> By <AUTHOR>

    It works but the original ‘published’ date still remains also

    Any pointers?

    This is what I added (but now removed)

    .posted-on .updated {
    display: inline-block;
    }
    .posted-on .published:not(:last-child) {
    display: none;
    }
    .posted-on .updated:before {
    content: “Last updated: “;
    position: relative;
    }

    Thanks!

    #1744347
    Andrew

    don’t worry, I figured it after a bit more Googling!

    .posted-on .updated {
    display: inline-block;
    }

    .posted-on .updated + .entry-date {
    display: none;
    }
    .posted-on .updated:before {
    content: “Last Updated “;
    }

    #1744440
    David
    Staff
    Customer Support

    Glad to hear that!

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.