-
melonbird
I’m using the Post Meta block element to display the date and author under post titles. I have it set to show the last modified date, with a text block that says “Updated:” before it. But when a post is first published, it just shows “Updated:” and then the author’s name. No date.
Is there a way to have it show “Published: [date]” on posts that have never been updated, and updated on those that have been?
-
Hi there,
if you set the Date to show the Published date, there is an option to display the Updated date if there is one.
-
melonbird
-
Thats the core Date Block.
Don’t use that.
Replace it with a GenerateBlocks Headline Block, and in the block settings ( sidebar ) activate the Dynamic Data and set the Content Source to Date.There you will see the options. -
melonbird
Thank you! That got the date working. This is probably a long shot, but is there any way to have the word “Published” or “Updated” before the date, depending which it is? If not, I may just remove that word altogether.
-
A simple method would be to add the label using CSS:
.entry-date.published:before { content: "Published: " } .entry-date.updated-date:before { content: "Updated: " }
-
melonbird
Thank you! That’s brilliant.
-
You’re welcome
- You must be logged in to reply to this topic.