Blog Article

Hide the ACF menu and show for specific user only

23 Dec 2018

When delivering a website to a client, it may be beneficial to hide the Advanced Custom Fields menu item. This will prevent your client from changing/deleting fields and will keep the website running smoothly.

Place code in your functions.php

add_filter('acf/settings/show_admin', 'my_acf_show_admin');
function my_acf_show_admin( $show ) { 
if ( get_current_user_id() == "1" ){
return true; // show it
else {
return false; // hide it
Last Modified: Sunday 23 December 2018 08:10
acf ACF menu

No Comments Yet...

Leave a reply

Your email address will not be published.