隐藏wordpress后台_如何在特定的WordPress页面上显示或隐藏小部件

隐藏wordpress后台

In our previous article, we showed you how you can extend the power of your default WordPress widgets. We mentioned a plugin called Widget Logic which you could use to show the widget on specific pages utilizing the conditional tags. But not everyone can understand those conditional tags. In this article, we will show you how to easily show or hide widgets on specific WordPress pages.

在上一篇文章中,我们向您展示了如何扩展默认WordPress小部件的功能 。 我们提到了一个名为Widget Logic的插件,您可以使用条件标签在特定页面上显示该Widget。 但是,并非所有人都能理解这些条件标签。 在本文中,我们将向您展示如何轻松显示或隐藏特定WordPress页面上的小部件。

Show or hide widgets on specific WordPress posts and pages
影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

First thing you need to do is install and activate the Widget Context plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活Widget Context插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, you need to visit Appearance » Widgets page. Click on any widget that you want to show or hide. This will expand the widget settings and you will see a new ‘Widget Context’ section.

激活后,您需要访问外观»小部件页面。 单击要显示或隐藏的任何小部件。 这将扩展小部件设置,您将看到一个新的“小部件上下文”部分。

Widget Context settings

Widget Context plugin allows you to easily show / hide widgets on selected WordPress posts, pages, archives, and more. Simply select the sections where you want to show or hide the widget from the settings.

Widget Context插件可让您轻松显示/隐藏选定WordPress帖子,页面,档案等上的Widget。 只需从设置中选择要显示或隐藏小部件的部分。

You can also show or hide widgets on specific URLs. Simply add the URL in widget settings.

您还可以显示或隐藏特定URL上的窗口小部件。 只需在小部件设置中添加URL。

Don’t forget to click on the save button to store your settings. You can now visit your website to see it in action.

不要忘记单击保存按钮来存储您的设置。 现在,您可以访问您的网站以查看其运行情况。

We hope this article helped you learn how to show or hide widgets on specific WordPress pages. You may also want to see our list of the most useful WordPress widgets that you can try on your website.

我们希望本文能帮助您学习如何在特定的WordPress页面上显示或隐藏窗口小部件。 您可能还希望查看我们可以在网站上尝试的最有用的WordPress小部件列表。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-show-or-hide-widgets-on-specific-wordpress-pages/

隐藏wordpress后台

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
WordPress文章隐藏内容登陆后可见插件 功能:您可以隐藏文章的部分内容,使得用户必须登录,才能浏览。可以方便给你的注册用户分享某些内容,游客只能被拒之门外了。 2.0版本添加了新的标签 <!--loginview start-->hidden contents.<!--loginview end-->,并在HTML模式下,添加了loginview按钮,方便用户添加隐藏内容。2.0版借鉴了WordPress插件Easy2hide的部分代码。升级至2.0版后,原来的标签[loginview]仍然有效。 安装方法:    1. 下载插件,解压缩,你将会看到一个文件夹login-to-view-all,然后将其放置到插件目录下,插件目录通常是 `wp-content/plugins/`    2. 在后台对应的插件管理页激活该插件Login to view all    4. 完成 使用说明:    1. 在WordPress后台编辑文章的时候,切换到HTML模式,选中你要隐藏的内容,点击按钮 "loginview" 即可用"<!--loginview start-->" 和 "<!--loginview end-->" 将隐藏内容括起来;使用这个标签的好处是,你停用本插件后,该标签不会被显示出来。    2. 如果你不喜欢HTML代码模式,可以使用 [loginview] 和 [/loginview] 将你想要隐藏的内容括起来,该标签支持可视化模式和HTML编辑模式。你的文章内容应该像这样子:[loginview]这里是你要隐藏的内容[/loginview]    3. 这样未登录的用户浏览文章的时候,将无法阅读隐藏的内容。   效果预览图: 1、在后台编辑文章,添加隐藏内容 2、未登录用户将无法查看隐藏的内容
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值