Skip to content

Instantly share code, notes, and snippets.

@cliffordp
cliffordp / functions.php
Last active September 26, 2021 18:10 — forked from jesseeproductions/tribe-ical-one-year.php
The Events Calendar Get Events for 1 Year from Today in iCal Export File -- http://example.com/events/?ical=1&year-feed
<?php
// From https://gist.github.com/cliffordp/ab1f7c4d95723ee6f892/, a fork of https://gist.github.com/jesseeproductions/2b1af6527b7029eaea6e
// References:
// https://theeventscalendar.com/support/forums/topic/ical-only-pushing-1-month-at-a-time/
// https://theeventscalendar.com/support/forums/topic/how-users-can-subscribe-to-my-events-calendar-in-their-personal-calendars/#post-1022932
// https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/3777092-subscribe-to-calendar-via-ical
/*
* The Events Calendar Get Events for 1 Year from Today in iCal Export File
* add coding to child theme's functions.php
* Tested works with The Events Calendar v3.12 and v4.0
@MindyPostoff
MindyPostoff / gist:c70dc98a099a9bf1c2f0
Last active June 15, 2021 21:58
Reorder Display of Fields on WooCommerce Bookings Form
/**
* A function to reorder the default display of fields on the WooCommerce Bookings form
* Put this function in your theme's functions.php file
*/
function custom_order_booking_fields ( $fields ) {
$reorder = array();
$reorder[] = $fields['wc_bookings_field_duration']; // Duration
$reorder[] = $fields['wc_bookings_field_resource']; // Resource
$reorder[] = $fields['wc_bookings_field_persons']; // Persons