Skip to content

Instantly share code, notes, and snippets.

nat-c / Remove-Monarch-Plugin-"Open-Sans"-stylesheet.php
Last active Apr 14, 2020
Remove Monarch Plugin "Open Sans" stylesheet : Code snippet to add to your CHILD Theme's functions.php
View Remove-Monarch-Plugin-"Open-Sans"-stylesheet.php
<?php // <--- you don't need to include this. Your functions.php file already starts with it.
/** We need to include this line, otherwise the "if is plugin active" check won't work **/
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
* Create (and name) a function
* to load your parent's stylesheet, (it's much better than the "@import" method!)
* any extra styles, and of course to remove styles as well
nat-c / nc-custom-wp-error-pages
Last active Nov 10, 2020
Custom WordPress Error Pages (not 404; this one is handled via your theme): A php snippet to put in your functions.php or in your plugin to get rid of the default WP error pages and have custom ones that match with your theme. The code is taken from a CRM application I'm building on top of WordPress [personal project] and slightly modified to be…
View nc-custom-wp-error-pages
add_filter( 'wp_die_handler', 'nc_get_custom_error_handler' );
function nc_get_custom_error_handler() {
return 'nc_custom_error_handler';
function nc_custom_error_handler( $message, $title = '', $args = array() ) {
$defaults = array( 'response' => 500, 'back_link' => false );
You can’t perform that action at this time.