How to stop fatal error when loading theme template file directly
I define some variables used in my theme at the top of functions.php….one of them being $press_here=”yes”; Then at the top of my template files I use <?php global $press_here; if( !isset( $press_here ) ) die(‘You don\’t have permission to view this page.’); Which then gives the error message I define there when being accessed … Read more