Last active
February 3, 2021 10:04
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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