User Slug
-
How should the user slug be written for a user with the username” Test User”?
Also, I created “Test User” as a 2nd Admin and then added this code to the child theme functions file:
if (is_admin()) {
// Make sure plugin is active
if (class_exists(‘\GlobalMetaBoxOrder\Config’)) {// Make a long name short.
class_alias(‘\GlobalMetaBoxOrder\Config’, ‘MetaBoxConfig’);// Settings
MetaBoxConfig::$filter = array(‘post’, ‘dashboard’); // default
MetaBoxConfig::$include_cpts = true; // default
MetaBoxConfig::$getBlueprintUserId = function () {$user = get_user_by(‘slug’, ‘Test User’);
return $user ? $user->ID : false;
};
MetaBoxConfig::$exclude = array(‘acme_product’);
MetaBoxConfig::$remove_screen_options = true;
MetaBoxConfig::$lock_meta_box_order = true;
}
}I have a lot of users and when I switched to a few of the Post Edit pages, I noticed that:
1. the meta boxes are not displaying in the order I setup as the “Test User” Admin.
2. the Screen Options box was still visible
3. the metaboxes were all still unlocked.Can you provide help with why this may be happening. Thanks!
- The topic ‘User Slug’ is closed to new replies.