Struggling to format the post date

I’m using the following to try and format the {post_date} but having issues, so even tested using a static date of 2026-05-05 instead:

{format_date:raw @date:'2026-05-05' @from:'Y-m-d' @to:'jS F Y'}

However for both methods the result is coming out unparsed in the frontend? What am I doing wrong?

Just add this to the end of the dynamic data tag.

{post_date:F j, Y @ g:i}

Adding “:F j, Y @ g:ia” will output Month, Day, Year @ time, May 21, 2026 @ 9:30am as an example.

You can read more about it here: Dynamic Data | Bricks Academy

Ah, i see, so post_date can’t use that new date_format option and has its own merge tag options?

How do you have your date setup in your settings section?

You can also read more about the different date structures here: Customize date and time format – Documentation – WordPress.org

It’s set up as Y-m-d (as this is the format which The Events Calendar stores its dates hence it makes direct comparisons easier) with time set as g:i a.

Does the format make any difference? The impression I got was that the new format_date function can take any date value and convert it to any other as long as you provide the relevant formats?

If I understand correctly, you are trying to change the date output of a custom field and not the native WP date. The {format_date} converts the native WP date string and not the third-party plugin date string.

The example I gave you above does the trick and works with custom field outputs. As far as I know, unless you build a custom function and then call it via {echo} I don’t see how it will work.

Apologies if I wasn’t clear but, no, it was simply the {post_date} merge tag I was trying to format, since by default this is in the format Y-m-d and I wanted to format it as jS F Y to make it more user-readable.

I therefore attempted to use the {format_date} merge tag to format the {post_date} in this manner as noted in my original post, however when this didn’t work I then tried using a static example date just to test it but this didn’t work either:

{format_date:raw @date:‘2026-05-05’ @from:‘Y-m-d’ @to:‘jS F Y’}

On the frontend the data isn’t parsed, it simply outputs that full merge tag untouched. Using the {post_date:F j, Y @ g:i} example you gave me does work but I’m still not clear on why my format_date example might not be? I presume I’m missing a character or the data in the merge tag is malformed?

Ok, I get you know. So this might be a code parsing format error. I just tried it and yes if you copy and paste the snippet you will output as a plain string.

Use this instead.

{format_date: raw @date:'{current_date}' @from:'Y-m-d' @to:'F j, Y'}

One thing to remember, the single quotes can get changed in their format causes errors. Plus, put a space between : and raw … In my example image below, you can see I am using the dynamic current date tag to pull todays date and change it from Y-m-d (as that is what I have set in my admin settings) to Month, Day, Year.

Hi guys,

Please remove the :raw
There are some mistakes in the new academy site. We will rectify it.

This should be the correct one
{format_date @date:'your-date-value' @from:'input-format' @to:'output-format'}

1 Like

Thanks for clarifying, with that additional information it’s working for me now!