Site logo

Archived topic

Last Updated

12 replies · Started by johnzoro on October 10, 2022

Viewing posts 1–13 of 13

I've got a plugin that shows when the post was last updated but i want to put it next to date published

so it would be

date published | shortcode here for post updated

any ideas?

Hi there,

you shouldn't require a plugin to display the updated date.
Is it possible to see a post on your site, so i can provide the best solution ?

sure

Hi John,

Try this CSS:

.single-post .posted-on .updated,.single-post .entry-header .entry-meta span.posted-on {
    display: inline-flex;
}

time.entry-date.published {
    order: -1;
}

.single-post .posted-on .updated:before {
    content: "|";
    padding-left: 10px;
    padding-right: 10px;
}

Hi Ying,

That sorta worked!

I added the word "Updated:" after the |

Is there a way to make the updated bit bold?

Also the spaces look a bit funny

[img]https://i.ibb.co/hd62xWL/spaces.png[/img]

the green bit indicates the space that's ok but the red bits show the space looks too big?

Try replacing the pseudo element CSS with this, so there's no padding on the right, and set the font-weight to bold.

.single-post .posted-on .updated:before {
    content: "| Updated: ";
    padding-left: 10px;
    font-weight: bold;
}

yeah that's great!

i had a play around and i think i've got the look i wanted!

thanks

it looks ok, but when i look at it on mobile the layout goes all funny

is there a way to maybe make the text smaller on mobile so it's all on one line?

Any chance you can link me to a post again? :)

okey dokey

Try this CSS:

@media (max-width: 768px) {
    .single-post .entry-header .entry-meta {
        font-size: 14px;
        display: flex;
        flex-direction: column;
    }
}

yeah that works! thanks

You are welcome :)

This archived topic is closed to new replies.