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
@joshfeck
joshfeck / ee_check_additional_questions_default.php
Created April 25, 2017 22:22
When creating an event this sets the “Personal Information” question group checkbox checked by default for the “Questions for Additional Registrants” section, so that the administrator won’t forget to tick the box.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'FHEE__EE_Admin_Page___load_page_dependencies__after_load__espresso_events__create_new',
'ee_custom_checkboxes_for_additional_question_groups_hook'
);
function ee_custom_checkboxes_for_additional_question_groups_hook() {
add_action(
'AHEE_event_editor_questions_notice',
@joshfeck
joshfeck / remove_add_state_form.php
Created January 24, 2017 19:10
Remove the "add a new state/province" form from the Event Espresso registration and billing forms
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'wp_loaded', 'my_remove_new_state_form' );
function my_remove_new_state_form() {
remove_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___question_group_reg_form__question_group_reg_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1, 1 );
remove_filter( 'FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1, 1 );
}
@lorenzocaum
lorenzocaum / new_gist_file.md
Last active July 22, 2019 00:10
An overview of how the sample templates for Event Espresso 4 work together

This is an addendum to the steps for setting up sample templates tutorial for Event Espresso 4:

https://gist.github.com/lorenzocaum/16aac08f099d7c154f04

In this article, we'll go over how different templates work together. Afterwards, you should feel comfortable with locating the template file(s) that you need to edit to make a customization to an events page or venues page in Event Espresso 4.

Sample templates for Event Espresso 4 are available here:

/wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014

@lorenzocaum
lorenzocaum / new_gist_file.md
Last active October 19, 2017 13:27
Steps for setting up new theme templates with Event Espresso 4

Previously, setting up new theme templates were done as a way to rearrange the event elements on the events listing page (e.g. example.com/events/) and the single event page (e.g. example.com/events/my-fun-event/).

There is now a feature that will let you change the order of the event elements and it can be found in WP-admin (WP dashboard) --> Event Espresso --> Events --> Templates. Then look for the Use Custom Display Order option and turn it on. Afterwards, you can drag and drop to adjust the Display Order. This can be done for the events listing page and the single event pages.

Event Espresso 4 uses a archive.php template file for the events listing page. Here is a sample URL for the events listing page:

example.com/events/

Event Espresso 4 uses a single.php template file for the single events page. Here is an example URL for a single events page:

@joshfeck
joshfeck / content-espresso_events.php
Last active August 29, 2015 14:07
Event Espresso 4 event content template part that will display only events that have tickets available on the event list page
<?php
/**
* This template will display a single event - copy it to your theme folder
*
* @ package Event Espresso
* @ author Seth Shoultes
* @ copyright (c) 2008-2013 Event Espresso All Rights Reserved.
* @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing *
* @ link http://www.eventespresso.com
* @ version 4+