Functions.php code that only runs on localhost?

This is the corect answer

if ( $_SERVER["SERVER_ADDR"] == '127.0.0.1' ) {
    function livereload(){
    ?>
        // mycode
     <?php
    }
    add_action('headway_body_close', 'livereload');
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)