Hi,
I am using a plugin to display a carousel of custom posts in Divi.
This plugin allows also to display custom fields.
While it works perfect with Types string fields, I have some problem with Types date fields, as these render the special timestamp containing date and time (eg. "1539986400")
There is a way to show only the date?
Please notice that the plugin doesn't allows to insert shortcodes, but only custom fields slugs (eg." wpcf-valid-from").
Any workaround?
Thanks
Best
Hello,
I assume we are talking about a custom date field created with Types plugin.
If it is, please try the shortcode [types] for display the date and time values, for example:
[types field="valid-from" format="Y/m/d g:i:s A"][/types]
see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#date
Hi,
correct. We are talking about Types custom date fields.
Sadly, this portfolio plugin doesn't accept shortcodes.
I can only use the name of the custom field (in this case "wpcf-valid-from")
Can I use an additional Types string field that automatically will be populate with this shortcode?
Something like "wpcf-valid-from-date" with "[types field="valid-from" format="d/m/Y"][/types]" inserted.
Would that work? Or there is a better solution?
Thanks
Best
No, there isn't such a built-in feature within Types plugin.
I suggest you check it with the author of "portfolio plugin", check if there is any way to use the shortcodew with this plugin, the shortcode is a built-in feature of WordPress, most of plugins/themes support wordpress shortcode.
I do really miss a simple date field.
Or at least an options in the current date field to choose what should be stored.
The Types custom date field stores value in time-stamp format
hidden link
There isn't such an option to choose what should be stored, but you can display it in different format with Types shortcode.
The problem is in the "portfolio plugin" side, it does not support the standard wordpress feature: shortcode.
https://codex.wordpress.org/Shortcode_API
As I mentioned above, you can you check it with the author of "portfolio plugin", maybe they have other solutions or some workaround.
If you need custom codes solution, you can also check it with our experienced contractors:
https://toolset.com/contractors/