Skip to content

Instantly share code, notes, and snippets.

View lorenzocaum's full-sized avatar

Lorenzo Orlando Caum lorenzocaum

View GitHub Profile
@lorenzocaum
lorenzocaum / new_gist_file.md
Last active February 16, 2022 21:58
How to handle partial payments in Event Espresso 4

In this guide we'll talk about handling partial payments in Event Espresso 4. This works best if you have an initial payment + a balance due. Here are some examples:

$250 deposit + $750 final payment

$500 deposit + $500 final payment

This idea uses two events: one to collect the initial deposit and one to collect the final payment.

Step 1 - Create an event for the initial payment

@lorenzocaum
lorenzocaum / new_gist_file.md
Created November 8, 2015 02:12
How to remove decimals from the total calculation in Gravity Forms

Add the sample code below to your child theme's functions.php file or in a site specific plugin.

<?php
//* Do NOT include the opening php tag

//* Remove decimals from total calculation in Gravity Forms
function gf_update_currency( $currencies ) {
	$currencies['USD'] = array(
	'name' =&gt; __( 'U.S. Dollar', 'gravityforms' ),
@lorenzocaum
lorenzocaum / new_gist_file.md
Last active February 19, 2020 18:35
Edit the Events Table View Template Add-on for Event Espresso 4 to show the a Goes On Sale date column

This can be done by relocating one of the templates and making a change to some lines of code. This will ensure that your customization is not lost on a software update.

The support team at Event Espresso will never recommend you edit any core plugin or add-on files directly.

Here are the steps:

  1. Login to your WordPress root with your preferred SFTP or FTP client. Filezilla and Cyberduck are free options. On a Mac? Try Transmit

  2. Browse to this location:

@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 January 31, 2019 14:14
Edit the Events Table View Template Add-on for Event Espresso 4 to show the first ticket price for each event in a new Starting From column

This can be done by relocating one of the templates and making a change to some lines of code. This will ensure that your customization is not lost on a software update.

The support team at Event Espresso will never recommend you edit any core plugin or add-on files directly.

Here are the steps:

  1. Login to your WordPress root with your preferred SFTP or FTP client. Filezilla and Cyberduck are free options. On a Mac? Try Transmit

  2. Browse to this location:

@lorenzocaum
lorenzocaum / new_gist_file_0.md
Last active January 24, 2019 02:05
Change the custom post types (CPT) slug for people in Event Espresso 4

Add the sample code below to your child theme's functions.php file or in a site specific plugin.

Change replaceme in the example below to the slug that you would like to use. For example, if you wanted to change people to organizers, then you should change replaceme to organizers and then save changes to your file.

Then be sure to browse to Settings --> Permalinks afterwards within your WP Dashboard to refresh your permalinks.

<?php
//* Do NOT include the opening php tag
 
@lorenzocaum
lorenzocaum / site-specific-plugin-adjust-cherry-jquery.php
Last active February 20, 2018 18:24
Deactivate jQuery that is included with Cherry framework and request a compatible version for WordPress from the Google CDN
<?php
/*
Plugin Name: Update jQuery Cherry framework
Description: Deactivate jQuery that is included with Cherry framework and request a compatible version for WordPress from the Google CDN
*/
/* Begin Adding Functions Below This Line */
// Remove themes old version of jQuery and load a compatible version
add_action('wp_enqueue_scripts', 'update_jquery_for_cherry_framework', 11);
function update_jquery_for_cherry_framework() {
@lorenzocaum
lorenzocaum / new_gist_file.md
Last active December 13, 2017 13:15
Edit the Events Table View Template Add-on for Event Espresso 4 to show remaining datetime quantities for each event

This can be done by relocating one of the templates and making a change to some lines of code. This will ensure that your customization is not lost on a software update.

The support team at Event Espresso will never recommend you edit any core plugin or add-on files directly.

Here are the steps:

  1. Login to your WordPress root with your preferred SFTP or FTP client. Filezilla and Cyberduck are free options. On a Mac? Try Transmit

  2. Browse to this location:

@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:

@lorenzocaum
lorenzocaum / new_gist_file_0.md
Last active August 9, 2017 12:49
Edit the Events Table View Template Add-on for Event Espresso 4 to link the event name to the single event page

This can be done by relocating one of the templates and making a change to a line of code. This will ensure that your customization is not lost on a software update. Here are the steps:

  1. Login to your WordPress root with your preferred SFTP or FTP client. Using a Mac? Try Transmit. Filezilla and Cyberduck are free options.

  2. Browse to this location:

/eea-events-table-view-template/templates

You'll see two files there: