I know how to hide the admin menu, but is there any way to keep the admin menu on local/development environment? Something like adding a code in wp-config.php
?
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.
Oh I see, thank you @James