Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active February 3, 2021 10:04
Show Gist options
  • Select an option

  • Save Pebblo/4c374a93c255b57fe262 to your computer and use it in GitHub Desktop.

Select an option

Save Pebblo/4c374a93c255b57fe262 to your computer and use it in GitHub Desktop.
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() ) {
return 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