Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Site specific plugin to remove the espresso-notices from the front page and archive pages. This is a fix for the Engrave (Lite) theme.
<?php
/*
Plugin Name: EE Site plugin for myexamplesite.com
Description: Site specific code for myexamplesite.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
add_filter( 'FHEE__EE_Front_Controller__display_errors', 'ee_remove_notices_from_front_page' );
function ee_remove_notices_from_front_page($display_errors) {
if( is_front_page() || is_archive() ) {
$display_errors = false;
}
return $display_errors;
}
/* Stop Adding Functions */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.