Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created January 26, 2016 11:28
Show Gist options
  • Save Pebblo/43ada112b6ecc80871eb to your computer and use it in GitHub Desktop.
Save Pebblo/43ada112b6ecc80871eb to your computer and use it in GitHub Desktop.
An example of how to prevent Woo Canvas from breaking the excerpts on EE archive list pages.
<?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 ee_remove_woo_remove_dropcap_from_excerpts() {
if ( is_post_type_archive( 'espresso_events' ) ) {
remove_filter( 'get_the_excerpt', 'woo_remove_dropcap_from_excerpts' );
}
}
add_action( 'template_redirect', 'ee_remove_woo_remove_dropcap_from_excerpts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment