How to hide the grout in WordPress cycle
作者:98wpeu发布时间:2024-01-25分类:WordPress教程浏览:207
WordPress允许您创建受密码保护的种子。最近,我们的一位读者问,是否有可能对网站隐藏受密码保护的帖子。在默认情况下,WordPress会隐藏受密码保护的种子的内容,但它仍然会显示带有'Protected'前缀的种子标题。在本文中,我们将向您展示如何在WordPress环中隐藏受密码保护的种子。
Why do you have to hide the prout in WordPress?
在默认情况下,WordPress会显示受密码保护的种子、标题和前缀均为“Protected”。用户需要输入密码才能查看帖子的内容。
这篇文章的标题可以在主页、档案、最近发布的帖子小工具等上看到。如果你想让一些内容完全保密,那么这不是一个理想的选择。
没有密码的用户不仅可以看到帖子标题,他们还可以尝试输入密码。众所周知,密码是可以被破解的。
话虽如此,让我们来看看如何从WordPress循环中隐藏受密码保护的种子,以便其他用户看不到它们。
在WordPress中隐藏受密码保护的种子
The results showed that the mechanical properties of the mechanical properties.

You can still visit the prout by directing the URL to the prout.
上面的例子向所有用户隐藏了受密码保护的帖子。In this paper,we study the relationship between the factors of the
只需使用另一个条件标记修改上面的代码,如下所示:
function wpb_password_post_filter( $where = '' ) { if (!is_single() && !current_user_can('edit_private_posts') && !is_admin()) { $where .= " AND post_password = ''"; } return $where; } add_filter( 'posts_where', 'wpb_password_post_filter' );由❤️托管WPCode
在WordPress中一键使用
在本例中,我们检查用户是否不能编辑受密码保护的帖子,然后只显示没有密码的帖子。这样做,所有具有管理员和编辑用户角色的用户都将在您的站点前端看到受密码保护的帖子。
我们希望这篇文章能帮助您隐藏受密码保护的种子,防止WordPress出现循环在您的网站上。You may also want to look at our tutorial,about how to change private and to be protected in WordPress.
和Google+.
相关推荐
- 多站点最好的WordPress常用插件下载博客插件模块的高级网络管理
- WPNakama快速简单的项目管理工具最好的WordPress常用插件下载博客插件模块
- 单独块页面生成器Gutenberg块最好的wordpress常用插件下载博客插件模块
- 用于强大表单的GSheetConnector最好的WordPress常用插件下载博客插件模块
- 产品折扣经理最好的WordPress常用插件下载博客插件模块
- 重新发现、重新发布和重新点燃您的Evergreen内容。Revive.so最好的WordPress常用插件下载博客插件模块
- 超棒的登录定制器最好的WordPress常用插件下载博客插件模块
- Easy Email最好的WordPress常用插件下载博客插件模块
- WooCommerce最好的WordPress常用插件下载博客插件模块的现场推车
- 伊莱扎聊天机器人最好的WordPress常用插件下载博客插件模块
- WordPress教程排行
- 最近发表