Skip to content

Instantly share code, notes, and snippets.

Clifford cliffordp

  • Oklahoma
Block or report user

Report or block cliffordp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cliffordp
cliffordp / functions.php
Last active Jun 3, 2019
Make WooCommerce cart Quantity input field non-editable (readonly) ONLY FOR Event Tickets Plus products
View functions.php
<?php
/**
* Make WooCommerce cart Quantity input field non-editable (readonly) ONLY FOR Event Tickets Plus products
*
* By Matt B and Cliff P
*
* From https://gist.github.com/cliffordp/66bf05df61ee269c60ff20d6f39e2cab
*/
function cliff_etplus_woo_cart_quantity_readonly() {
@cliffordp
cliffordp / functions.php
Last active May 1, 2019
For https://theeventscalendar.com/support/forums/topic/number-of-tickets-available/ The Events Calendar + Event Tickets Plus + WooCommerce: Hide remaining quantity unless it is less than 4 (to create a sense of urgency) NOTE: Would need .each loop logic to work properly for more than just the first WooCommerce ticket if more than 1 WooCommerce t…
View functions.php
<?php
/**
* The Events Calendar + Event Tickets Plus + WooCommerce: Hide remaining
* quantity unless it is less than 4 (to create a sense of urgency).
*
* NOTE: We would need .each loop logic to work properly for more than just the
* first WooCommerce ticket if more than 1 WooCommerce ticket is available
* per event!
*
* If you want to ALWAYS hide (no sense of urgency logic), do not use this
@cliffordp
cliffordp / functions.php
Last active Apr 14, 2019
WP All Import - set uploads folder to the Import ID
View functions.php
<?php
/**
* WP All Import: Upload media to a directory named after the Import ID.
*
* @link https://gist.github.com/cliffordp/fc0fa5686d6a127246224f1565b60128 This snippet.
* @link https://github.com/soflyy/wp-all-import-action-reference/blob/master/all-import/wp_all_import_images_uploads_dir.php
*
* @see PMXI_Import_Record::process()
* @see wp_upload_dir()
*
@cliffordp
cliffordp / functions.php
Last active Apr 13, 2019
Shortcode to display render Tribe Bar anywhere on site (e.g. website header) * Notes: It's not pretty or perfect, but it's a start if you want to pull something like this off on your site. FYI: You're in unsupported / custom coding territory. * Example: [tribe_bar_anywhere] * Screenshot: https://cl.ly/3h1S3d3a3T30
View functions.php
<?php
/*
* By Barry and Cliff
* From https://gist.github.com/cliffordp/04b7bbe6e7d9009aec12acc0b9bd5bdd
*
* Shortcode to display render Tribe Bar anywhere on site (e.g. website header)
* For https://theeventscalendar.com/support/forums/topic/insert-search-bar-on-top-of-a-page/ which also links to http://gregorypearcey.com/blog/add-tribe-events-search-bar-home-page/
*
* Notes: It's not pretty or perfect, but it's a start if you want to pull something like this off on your site. FYI: You're in unsupported / custom coding territory.
@cliffordp
cliffordp / functions.php
Last active Apr 8, 2019
Set default quantity of 1 and READONLY for all tickets: Same as https://gist.github.com/cliffordp/5b57df71be8b52f595817ddbf81acdab except make quantity readonly
View functions.php
<?php
/**
* Set default quantity of 1 and READONLY for all tickets:
* - Event Tickets RSVP
* - Event Tickets Plus WooCommerce
* - Event Tickets Plus Easy Digital Downloads
*
* From https://gist.github.com/cliffordp/80b33455779b74ec49f6ea3033cb47bf
*
* Same as https://gist.github.com/cliffordp/5b57df71be8b52f595817ddbf81acdab except make quantity readonly
@cliffordp
cliffordp / functions.php
Last active Mar 22, 2019
Open Event Website, Organizer, and Venue links in new window
View functions.php
<?php
/**
* The Events Calendar: Open event website, organizer, and venue links in new window.
*
* Filters are found in these files:
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/link.php
* /wp-content/plugins/events-calendar-pro/src/functions/template-tags/general.php
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/organizer.php
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/venue.php
*
@cliffordp
cliffordp / functions.php
Last active Mar 12, 2019
The Events Calendar - Redirect single event view page to its Event Website
View functions.php
<?php
/**
* The Events Calendar - Redirect single event view page to its Event Website
*
* The regular single event view page will be loaded if the event does not have a valid Event Website URL.
*
* From https://gist.github.com/cliffordp/2e5c53412171363b66864087b6a75bad
*
* For https://theeventscalendar.com/support/forums/topic/recurring-event-custom-event-link-behind-events-calendar/
*/
@cliffordp
cliffordp / functions.php
Last active Feb 26, 2019
WooCommerce: Remove unnecessary billing fields from Checkout page.
View functions.php
<?php
/**
* WooCommerce: Remove unnecessary billing fields from Checkout page.
*
* Billing fields will display if cart total is greater than zero at time of
* loading the Checkout page. If coupon is added to bring total down to zero,
* billing fields will remain displayed unless page is also refreshed by user.
*
* Billing fields will always display if the order needs shipping information
@cliffordp
cliffordp / functions.php
Last active Jan 18, 2019
Filter the minDate and maxDate for The Events Calendar's "Custom Datepicker Start Date" extension. 7 days prior to Today through 1 month forward from today.
View functions.php
<?php
/**
* Filter the minDate and maxDate for The Events Calendar's "Custom Datepicker
* Start Date" extension, which requires PHP 5.3+.
*
* 7 days prior to Today through 1 month forward from today.
*
* @see Tribe__Extension__Custom_Datepicker_Start_Date::get_min_date()
* @see Tribe__Extension__Custom_Datepicker_Start_Date::get_max_date()
*
@cliffordp
cliffordp / functions.php
Last active Jan 10, 2019
The Events Calendar: Display WordPress custom fields in the Item Details part of the List Venues Organizers Shortcode extension.
View functions.php
<?php
/**
* The Events Calendar: Display WordPress custom fields in the Item Details part of the
* List Venues Organizers Shortcode extension.
*
* Excludes hidden fields (beginning with `_`) and Elegant Theme's hidden fields (beginning with `et_`).
* Authored by Richard of memberwise.org.uk and Clifford (Tribe Support).
*
* @link https://gist.github.com/cliffordp/a6cff51ed56276641c4d4ea0a82b25b9 This snippet.
* @link https://theeventscalendar.com/extensions/list-venues-and-organizers-shortcodes/ Extends this extension.
You can’t perform that action at this time.