Skip Navigation

[Resolved] Synchronize the post published and updated date with a date custom field

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by thibaultS 5 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#1344815

Tell us what you are trying to do?
I have a custom content type named Representation with a date field named reprDate. I want the standard post created and updated date of the post to be always the same as my custom field.

Otherwise, what is the code to retrieve the value of this field and include it in my theme

#1344833

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

If you just need to know how to retrieve and display the value of your custom date field using PHP (in some theme template) then there is no need to synchronize the standard date fields with it.

You can see how to output a Types field with PHP here: https://toolset.com/documentation/customizing-sites-using-php/functions/

That page includes specific information about the date field with an example of how to render such a field.

#1345247

My issue is resolved. Thank you.