Skip Navigation

[Resolved] Need to create a schedule / calendar

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.

This topic contains 6 replies, has 2 voices.

Last updated by zoeS 5 years, 7 months ago.

Assigned support staff: Ross Fisher.

Author
Posts
#365109

I need to create a schedule, something like this: hidden link
I have looked at so many WordPress plug-ins and none of them really do what I need, which essentially is to have a combination of repeating and one off events that can all be shown together in a filterable calendar. The link above does use a WP plug-in and would be ideal but it requires subscription to a third party service. Before I spend an unimaginable number of hours trying to figure it out, do you think this can be achieved using WP-Types? or are you aware of a plug-in that already exists that could save me a lot of time?

On a related question, I have already started playing about with it and the first obstacle I have hit is that I need to add a custom field for just "time" rather than "date & time". How is this possible?

Many thanks

#365110

Thank you for contacting Toolset support, I'd be delighted to assist!

While Toolset is a rich suite of tools to use to build just about any site, I fear that at least from my perspective that it could take some time and effort to build form scratch. I'm not saying that it can't do it, just that personally I feel as if there is already a solution that works, why not use it?

The first plugin that comes to mind is Event Manager. Many of our users have modified it with the help of Toolset, such as adding custom Taxonomies or Fields. I don't think that it can render like in the example though!

There are some sites out there with Event and Booking plugin reviews, check it out! hidden link

#365120

Thank you so much for the reply Ross, that was exactly what I had feared, but it actually hadn't occurred to me that I could use Types to customise other plug-ins. I'll explore a little more.

How about the time field issue? Is this just a case of using a numeric or text field and specifying a certain format?

#365125

At the time of input in a CRED form, the time format isn't supported. However, when it's a matter of displaying the value of this date field (with a post, page or view). You can format it using Types or Views short codes. Because all dates are stored in Unix Timestamp format, so these can easily be converted into desired format, when needed.

Please see:
- https://toolset.com/documentation/functions/#date
- https://toolset.com/documentation/views-shortcodes/#wpv-post-date

For CRED Generic Fields, you can use following custom short code to retrieve and format the date accordingly:

function date_format($atts){
	$format = $atts["format??];
	$date = $atts["date??];

	return date($format, $date);
}
add_shortcode("date-format??, "date_format??);

Please add this code to your theme's functions.php file and use as below:

[date-format date="[wpv-post-field name='start-date']" format="Y/m/d g:i A"]
#365126

I don't think I explained that very well – for the recurring classes, I don't need a date, only a time. So am I correct that when setting up the custom fields for that post type using a date field is not the way to go?

#365130

Right, what I'm trying to say is - we don't have a time field in Types currently. To add one would require some custom development and the above was just one way of writing some custom code to accomplish this.

The "Date" field works for the time as well. All you need to select "Input date and time" when configuring your field. However if you are looking for a "time only" field, that's not possible with Types. Since "time" (hour/minutes/seconds) itself have no value when separated from a "date".

I hope this makes sense 🙂

#365132

Ok yes got it it does make sense. Thanks again Ross for the super quick replies.