Skip Navigation

[Resolved] Toolset block to list Events Calendar Events by event start date

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 1 year, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2557431
Screen Shot 2023-02-19 at 8.45.47 AM.png

Tell us what you are trying to do?

I am trying to create a view block that lists events created in The Events Calendar sorted by the event's start date

Is there any documentation that you are following?

No.

Is there a similar example that we can see?

No.

What is the link to your site?

hidden link

When I configure the view block, I don't see the start date field among the dropdown list of field options for sorting.

Is there a way I can make this work?

#2557901

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please confirm what events calendar plugin you are using?

#2558739

The Events Calendar as in hidden link

#2559429

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The Events Calendar stores the Event Start date with the field name: _EventStartDate

To use the "_EventStartDate" field with the view's ordering section, you will have to add it from the "Hidden custom fields" section that is available at:
=> Toolset => Settings => Frontend Content => Hidden custom fields section and click on button "Select custom fields" to add the field _EventStartDate.

Once you add the _EventStartDate custom field to "Hidden custom fields" section then you should refresh your page/view and then navigate to Ordering section and select the field "_EventStartDate" from the dropdown and save your view/page and check on the frontend.

More info:
- https://toolset.com/course-lesson/using-third-party-hidden-fields/

#2561161
Screen Shot 2023-02-24 at 3.16.01 PM.png

Okay. Now I see it as a field I can use to sort the list of events.

Now I would like to be able to display parts of the date and hide others.

I figured I would use the date format selection options that appear when I display another date field like the Post Date. (See attached).

But no such choice is available to me when I place the start date field in the view output.

Can I get Toolset blocks to treat that field like a date field?

#2562183

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

No - as Toolset date field stores the date value as a current timestamp.

You will have to write custom shortcode. Here is the related ticket where you can find the related shortcode:
- https://toolset.com/forums/topic/format-the-event-calendar-date-outputted-by-views/#post-1341479