0

I am trying to prefix today's (blog)posts with "Today". So that it would read:

Today, January 12, 2015

From tomorrow on the prefix should not be displayed anymore. I want to achieve an eyecachting effect for the latests posts like that.

I have looked into EE's relative dates but nothing outputs exactly what I need and I don't know how to stop it after today either.

Has anybody achieved this in the past. Seems to be a pretty basic thing actually...

1 Answer 1

2

You could do this:

{if '{entry_date format="%Y%m%d"}' == '{current_time format="%Y%m%d"}'}Today, {/if}{entry_date format="%F %j, %Y"}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.