
wordpress 简单按钮
您想禁用 WordPress 中的屏幕选项按钮吗?屏幕选项按钮允许您在 WordPress 管理区域的不同页面上显示和隐藏元素。在本文中,我们将向您展示如何禁用 WordPress 中的屏幕选项按钮。
想要禁用 WordPress 中的屏幕选项按钮吗?屏幕选项按钮允许您显示和隐藏 WordPress 管理区域中不同页面上的元素。在本文中,我们将向您展示如何禁用 WordPress 中的屏幕选项按钮。

为什么要禁用屏幕选项按钮? (Why You May Want to Disable Screen Options Button?)
屏幕选项 button is located on the top right corner of different pages in your WordPress admin area. It allows each logged in user to show and hide items on various sections of the WordPress admin area.
屏幕选项按钮位于WordPress管理区域中不同页面的右上角。 它允许每个登录用户在WordPress管理区域的各个部分上显示和隐藏项目。
Many WordPress site owners run 多作者博客. With screen options button, their authors may accidentally uncheck something that is important.
许多WordPress网站所有者经营着多作者博客 。 使用屏幕选项按钮,其作者可能会意外取消选中重要的内容。
For example, on the posts edit screen users can show / hide 更改作者字段, featured image section, and more.
例如,在帖子编辑屏幕上,用户可以显示/隐藏更改作者字段 ,特色图像部分等。

您可以通过禁用屏幕选项按钮来控制所有用户的管理视图。让我们看看如何轻松禁用 WordPress 中的屏幕选项按钮。
您可以通过禁用屏幕选项按钮来控制所有用户的管理员视图。让我们看看如何轻松禁用 WordPress 中的屏幕选项按钮。
方法1:使用插件隐藏屏幕选项按钮 (Method 1: Hiding Screen Options Button Using Plugin)
此方法更简单,建议所有用户使用。
此方法比较简单,推荐所有用户使用。
First thing you need to do is install and activate the Adminimize plugin. For more details, see our step by step guide on 如何安装 WordPress 插件.
您需要做的第一件事是安装并激活Adminimize插件。 有关更多详细信息,请参阅有关如何安装 WordPress 插件步指南。
Upon activation, you need to visit 设置 » 管理 page to configure plugin settings.
激活后,您需要访问设置 » 管理页面以配置插件设置。

您将看到一个部分列表。在此页面上,您需要单击“全局选项”链接,它将带您进入不同的部分选项卡。在该选项卡上,您需要再次单击“全局选项”选项卡将其展开。
您将看到部分列表。在此页面上,您需要单击“全局选项”链接,该链接将带您进入其他部分选项卡。在此选项卡上,您需要再次单击“全局选项”选项卡将其展开。

这将展开该选项卡,您将在 WordPress 管理区域中看到一堆显示和隐藏的选项。您需要选中“屏幕选项”旁边的框。
这将展开选项卡,您将在 WordPress 管理区域中看到一堆显示和隐藏选项。您需要选中“屏幕选项”旁边的框。

The plugin allows you to disable it for all users as well as selected 用户角色.
该插件允许您为所有用户以及选定的用户角色禁用它。
完成后,不要忘记单击更新选项按钮来保存您的设置。
完成后,不要忘记单击“更新选项”按钮来保存设置。
您现在可以访问管理区域中显示“屏幕选项”按钮的任何页面,例如仪表板或帖子/页面编辑屏幕,您会注意到“屏幕选项”按钮现已禁用。
您现在可以访问管理区域中显示“屏幕选项”按钮的任何页面,例如仪表板或帖子/页面编辑屏幕,您会注意到“屏幕选项”按钮现已禁用。
Adminimize is a really powerful plugin that allows you to completely change the WordPress admin area by selectively showing or hiding different items. For more details, see our article on 使用 Adminimize 从 WordPress 管理区域隐藏不必要的项目.
Adminimize是一个功能非常强大的插件,可让您通过有选择地显示或隐藏其他项目来完全更改WordPress管理区域。 有关更多详细信息,请参阅有关使用 Adminimize 隐藏 WordPress 管理区域中不必要的项目文章。
方法2:在WordPress中手动禁用屏幕选项按钮 (Method 2: Manually Disable Screen Options Button in WordPress)
This method requires you to add code to your WordPress files. If you haven’t done this before, then please take a look at our guide on 如何在 WordPress 中复制和粘贴代码.
此方法要求您将代码添加到WordPress文件中。 如果您以前没有做过,请查看我们的指南, 了解如何在 WordPress 中复制和粘贴代码 。
You will need to add the following code to your WordPress theme’s 函数.php file or a 特定于站点的插件.
您将需要在WordPress主题的函数.php文件或具体的于在网站的插件中添加以下代码。
function wpb_remove_screen_options() {
if(!current_user_can('manage_options')) {
return false;
}
return true;
}
add_filter('screen_options_show_screen', 'wpb_remove_screen_options');
此代码为除管理员之外的所有用户删除屏幕选项按钮。
此代码为除管理员之外的所有用户删除屏幕选项按钮。
您现在可以切换到非管理员的任何其他用户帐户。之后,访问您的管理区域仪表板屏幕,您会注意到屏幕选项按钮已消失。
现在您可以切换到非管理员的任何其他用户帐户。然后,访问管理区域仪表板屏幕,您会注意到“屏幕选项”按钮已消失。
We hope this article helped you learn how to easily disable screen options button in WordPress. You may also want to see our mega list of 最有用的 WordPress 提示、技巧和技巧 for beginners.
我们希望本文能帮助您学习如何轻松禁用WordPress中的屏幕选项按钮。 您可能还想查看我们的针对初学者的最有用的 WordPress 提示、技巧和技巧列表。
If you liked this article, then please subscribe to our YouTube 频道 for WordPress video tutorials. You can also find us on 推特 and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube 频道 WordPress视频教程。 您也可以在推特和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-disable-the-screen-options-button-in-wordpress/
wordpress 简单按钮