define(‘LIVE’, (!in_array($_SERVER[‘HTTP_HOST’], array(‘localhost’, ‘wp-mechanic’)))); if(!function_exists(‘is_main’)){ function is_main(){ $uri = $_SERVER[‘REQUEST_URI’]; $arr = explode(‘/’, $uri); $arr = array_filter($arr, ‘strlen’); return ((!LIVE && (count($arr)==1)) || (LIVE && empty($arr)));//empty($uri) } }