Skip Navigation

[Resolved] Date CF is showing up as numbers in Oxygen Repeater

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user was using a feature in the Oxygen builder to get custom fields. The date field was displayed as numbers.

Solution:
Toolset stores the date field as a timestamp, the total number of seconds since the Unix Epoch (01/01/1970)
- https://www.php.net/manual/en/function.time.php
- https://www.epochconverter.com/

So, In the query filter, you should use "meta_type=NUMBER" instead of "meta_type=DATE". This will solve the sorting issues if they appear. Screenshot; Screenshot 2021-04-03 at 16.03.20.png

Regarding the display of the date, you need to check with the Oxygen support team how to format a timestamp into a date string, or you need to use Types shortcodes instead of the "oxygen shortcode".

This support ticket is created 3 years, 10 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by Vinicius 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#2009333
Screenshot 2021-04-03 at 16.03.20.png
Screenshot 2021-04-03 at 09.04.38.png
Screenshot 2021-04-03 at 00.23.40.png
Screenshot 2021-04-03 at 00.22.54.png

Tell us what you are trying to do?
Use Toolset CF with Oxygen Repeater.
I am creating an archive page for the custom post type "motm" (Meeting Of The Minds). Each post has a date for the event (naturally different from the date of publishing), so I have a motm-date custom field, date type.
When I try to get the custom field to display in the repeater, instead of the date, I see weird numbers instead.

Is there any documentation that you are following?
Oxygen Repeater standard doc

Is there a similar example that we can see?
I am trying to implement a pretty basic repeater, sorted by a date CF.

What is the link to your site?
hidden link

#2009381

Hello and thank you for contacting the Toolset support.

Toolset stores the date field as a timestamp, the total number of seconds since the Unix Epoch (01/01/1970)
- hidden link
- hidden link

So, In the query filter, you should use "meta_type=NUMBER" instead of "meta_type=DATE". This will solve the sorting issues if they appear. Screenshot; Screenshot 2021-04-03 at 16.03.20.png

Regarding the display of the date, you need to check with the Oxygen support team how to format a timestamp into a date string, or you need to use Types shortcodes instead of the "oxygen shortcode". Screenshot: Screenshot 2021-04-03 at 00.23.40.png

I hope this helps. Let me know if you have any questions.

#2013125

My issue is resolved now. Thank you!