Support

Account

Home Forums General Issues Hide admin menu on production but still show it on local Reply To: Hide admin menu on production but still show it on local

  • Hi @satrya

    You can check if the current user is accessing the server locally or remotely. This thread should give you more idea about it: http://stackoverflow.com/questions/6626204/how-to-check-if-the-php-script-is-running-on-a-local-server

    So, you can use a code like this:

    if($_SERVER['REMOTE_ADDR']!='127.0.0.1'){
        add_filter('acf/settings/show_admin', '__return_false');
    }

    I hope this helps.