Skip to content

Instantly share code, notes, and snippets.

View Pebblo's full-sized avatar
🏠
Working from home

Tony Warwick Pebblo

🏠
Working from home
  • Event Espresso
  • Liverpool, UK
View GitHub Profile
@Pebblo
Pebblo / readme.md
Last active January 12, 2026 16:48

Example of how to add a 'LAST_PAYMENT_PAYMENT_TIMESTAMP_' shortcode to the EE Messages system. This will parse to the full timestamp of the last payment made on a transaction, however you can pass a format attribute to set your own, e.g "LAST_PAYMENT_PAYMENT_TIMESTAMP_ format='d/m/Y']"

@Pebblo
Pebblo / content-espresso_event_attendees.php
Last active December 16, 2025 20:48 — forked from joshfeck/content-espresso_event_attendees.php
Example of a custom template for the [ESPRESSO_EVENT_ATTENDEES] shortcode. Event Espresso 4. You can add this template to your active WordPress theme.
<?php
/**
* Content Template for the [ESPRESSO_EVENT_ATTENDEES] shortcode
*
* @package Event Espresso
* @subpackage templates
* @since 4.6.29
* @author Darren Ethier
*
* Template Args that are available in this template
@Pebblo
Pebblo / functions.php
Created September 9, 2025 10:29 — forked from joshfeck/functions.php
Disables the calendar icon functionality that was added in Event Espresso
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'template_redirect', 'my_remove_ical_link' );
function my_remove_ical_link() {
remove_filter( 'FHEE__espresso_list_of_event_dates__datetime_html', array( 'EED_Ical', 'generate_add_to_iCal_button' ), 10 );
}
@Pebblo
Pebblo / example.php
Last active August 1, 2025 15:15
Add an 'Update contact' metabox to the edit registration page, you can set the contact ID the registration should be assigned to and then update.
<?php // Please do not include the opening php tag if you already have one
function tw_add_attendee_id_metabox( $something ) {
// Add an contact metabox to the edt registration page.
add_meta_box(
'edit-contact-id-mbox',
esc_html__('Contact ID', 'event_espresso'),
'tw_edit_contact_id_mbox',
$something->wp_page_slug,
'side'
@Pebblo
Pebblo / robots_expired.php
Last active June 12, 2025 18:28 — forked from joshfeck/robots_expired.php
Add a noindex meta tag to expired Event Espresso 4 events. Useful for SEO.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_add_tagseo_meta() {
if ('espresso_events' == get_post_type() && is_single() ){
$id = get_the_id();
$event = EEH_Event_View::get_event( $id );
$status = $event instanceof EE_Event ? $event->get_active_status() : '';
if ( $status == 'DTE' ) {
echo '<meta name="robots" content="noindex">';
@Pebblo
Pebblo / ee_archive_remove.php
Last active April 29, 2025 20:01 — forked from joshfeck/ee_archive_remove.php
Remove the standard Event Espresso custom post type archive
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EventEspresso_core_domain_entities_custom_post_types_CustomPostTypeDefinitions__getCustomPostTypes',
'tw_ee_remove_event_cpt_archive'
);
function tw_ee_remove_event_cpt_archive( $cpt_registry_array ) {
if ( isset( $cpt_registry_array['espresso_venues'] ) ) {
$cpt_registry_array['espresso_venues']['args']['has_archive'] = false;
@Pebblo
Pebblo / content-espresso_people-details.php
Last active February 27, 2025 13:26
Template file used to output /people/{person-name}/ and display the related events. This template only pulls in Upcoming events rather than all.
<?php
/**
* Template file to add extra content to a single person display
* Note: To customize, just copy the template from /public/templates/* and put in your theme folder.
*
* @since 1.0.0
* @package EE People Addon
* @subpackage template
* @author Tony Warwick
@Pebblo
Pebblo / example.php
Last active February 13, 2025 11:39
This function sets the Registration CSV report to only export primary registrants.
<?php //Please do not include the opening PHP tag if you already have one
function tw_ee_only_export_primary_registrants($reg_csv_array, $reg_row) {
//Only export the primary registrants
if( $reg_row['Registration.REG_count'] !== '1' ) {
return array();
}
//Include the REG_Group_Size column so you can see how many tickets purchased.
@Pebblo
Pebblo / add_calendar_scripts.php
Last active September 19, 2024 11:23 — forked from joshfeck/add_calendar_scripts_everywhere.php
Add calendar scripts to a specific page. Page builder themes rejoice!
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'template_redirect', 'tw_add_ee_calendar_assets' );
function tw_add_ee_calendar_assets() {
// change is_page() parameter to match your calendar page slug
if ( class_exists( 'EED_Espresso_Calendar' ) && is_page( 'whats-on' ) ) {
global $is_espresso_calendar;
$is_espresso_calendar = TRUE;
add_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' ) );
@Pebblo
Pebblo / my_custom_checkboxes_for_additional_question_groups.php
Last active January 8, 2024 23:49 — forked from joshfeck/my_custom_checkboxes_for_primary_question_groups.php
Check a question group box by default. For the Event Espresso 4 event editor. Additional Question group ID 1 (Personal Information).
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'AHEE_event_editor_questions_notice', 'my_custom_checkboxes_for_additional_question_groups' );
function my_custom_checkboxes_for_additional_question_groups() {
echo '<script>jQuery(
"#espresso_events_Registration_Form_Hooks_Extend_additional_questions_metabox input[value=\'1\']"
)
.prop( "checked", true );</script>';
}