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 / ee_render_venue_location_before_content.php
Last active August 10, 2026 14:14 — forked from joshfeck/venue_mods.php
Move venue address so it appears before venue content. Event Espresso 4
<?php
/**
* By default EE appends the "content-espresso_venues-location.php" template AFTER the
* venue content. It does this via the EED_Venue_Single / EED_Venues_Archive
* ::venue_location() callbacks, which are hooked onto `the_content` (and, for the
* archive, `the_excerpt`) at priority 110 from inside each module's venue_details().
*
* Rather than trying to intercept those filters per-context (the gist approach only
* caught single venues because the archive module re-registers its filters inside the
* loop and also uses `the_excerpt`), we hook the single seam that every venue render
@Pebblo
Pebblo / ee-site-specific-plugin.php
Last active April 24, 2026 20:26
This is an example of how you can add payment methods to the available payment methods on the front end for admin users only. This function will add the 'Invoice' payment method that admins can select on the front end of the site, (any user without the 'manage_options' cap will not see the PM). This is useful for allowing users to use Multi Even…
<?php
/*
Plugin Name: Event Espresso site specific functions
Description: Add custom functions for Event Espresso to this plugin.
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
function tw_ee_output_admin_invoice_payment_method($payment_methods, $transaction, $scope) {
//Check if the user is logged in, is not within the admin and has the correct capability
if( is_user_logged_in() && current_user_can( 'manage_options' ) ) {
@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.