Hey there,
my problem is in a view. i have a field "post-date" and it is shown in the front end every time in the unix timestamp.
Could you help me fix this with javascript?
my id of the dat is #datestamp.
Therefore i am very bad in jquery or javascript.
hope you can guide my with a simple function on pageload.
Thank you so much.
Hello,
How do you setup/create the custom field "post-date"?
If it is a custom date field created with Types plugin, you can output the date value as the format you wanted, for example:
[types field="post-date" format="d/m/Y"][/types]
See our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#date
format:
any valid WordPress date format
If it is a post field created with other plugins/theme, you can also convert it under Types control, then display the field value with above Types shortcode too, see our document:
https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/#converting-custom-fields
Section "Converting custom fields"
Hey Luo,
thanks for your reply. Unfortunately it is a bit complicated in my case.
I use the toolset postdate shortcode in an elementor template.
this elementor template sits via its shortcode in a view loop.
And at this point the dateformat changes to the unix.
I know that is not officially supported to put elementor shortcodes in the view loop, but it works very great.
Except for the postdate field. Therefore i need help to get a workaround with javascript to modify the unix back to a dateformat.
hope you can help me fix this!
thank you so much.
cHeers
My issue is resolved now.
The problem was a plugin which has change the wordpress date format in the unix timestamp.
Thanks for your help Luo.