/*====================================
= 404 TEMPLATE =
====================================*/
// FILTER THE 404 TITLE
add_filter( 'generate_404_title', 'kpry_404_title' );
function kpry_404_title() {
return '<h1>404</h1>
<h2>Sorry, we can\'t find that page.</h2>
<h3>An alert has been sent to the website owner.</h3>';
}
// USE JAVASCRIPT TO INSERT A "GO BACK" LINK
add_filter( 'generate_404_text', function() {
return '<a class="button" href="javascript:history.go(-1)">Go Back</a><br><br>OR';
} );