Title: Hide/Show Post/Page Content
Author: sosidee
Published: <strong>2020 年 7 月 21 日</strong>
Last modified: 2024 年 12 月 30 日

---

搜索插件

![](https://ps.w.org/hideshow-postpage-content/assets/banner-772x250.jpg?rev=2344581)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/hideshow-postpage-content/assets/icon-256x256.gif?rev=2344198)

# Hide/Show Post/Page Content

 作者：[sosidee](https://profiles.wordpress.org/sosidee/)

[下载](https://downloads.wordpress.org/plugin/hideshow-postpage-content.1.5.4.zip)

 * [详情](https://cn.wordpress.org/plugins/hideshow-postpage-content/#description)
 * [评价](https://cn.wordpress.org/plugins/hideshow-postpage-content/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/hideshow-postpage-content/#developers)

 [支持](https://wordpress.org/support/plugin/hideshow-postpage-content/)

## 描述

It permits to **hide** or **show** part of the content of posts or pages to users
that are _logged_ or _not_.
 It’s also possibile to select the role(s) or the username(
s) of logged users.

The content to be hidden or displayed must be included in a _shortcode_ tagged as‘**
soshsc**‘.

The info page is available under the **Tools** menu.

It’s compatible with **Elementor** from the version 2.0.
 The widget is in the _general_
category.

**Shortcode parameters**

hide=”guest”
 _hides content to guests_

hide=”logged”
 _hides content to legged users_

show=”guest”
 _displays content to guests_

show=”logged”
 _displays content to legged users_

role=”subscriber”
 _enables the action (show/hide) only to users with the ‘Subscriber’
role_

role=”subscriber,editor”
 _enables the action (show/hide) only to users with the‘
Subscriber’ or ‘Editor’ role_

user=”foo”
 _enables the action (show/hide) only to the user with username ‘foo’_

user=”foo,bar”
 _enables the action (show/hide) only to the users with username ‘
foo’ or ‘bar’_

Examples:

 1. Hide content to unlogged users:
     [soshsc hide=”guest”]_This content is hidden only
    to users not logged._[/soshsc]
 2. Hide content to logged users:
     [soshsc hide=”logged”]_This content is hidden only
    to logged users._[/soshsc]
 3. Show content only to unlogged users:
     [soshsc show=”guest”]_This content is displayed
    only to users not logged._[/soshsc]
 4. Show content only to logged users:
     [soshsc show=”logged” role=”administrator”]
    _This content is displayed only to administrators._[/soshsc]

## 屏幕截图

 * [[
 * The info page (Tools Menu)
 * [[
 * The Elementor widget (General Category)

## 评价

![](https://secure.gravatar.com/avatar/02b2a453e382ab20a4c00070c380a5c9fc14d624baccb351c9e7f61b94893f7c?
s=60&d=retro&r=g)

### 󠀁[Convenient and very helpful](https://wordpress.org/support/topic/convenient-and-very-helpful/)󠁿

 [trialho61](https://profiles.wordpress.org/trialho61/) 2023 年 2 月 22 日

I have been looking for a plugin with similar functionality for a long time. Very
happy that I found it. That’s what I need!

![](https://secure.gravatar.com/avatar/3604db4226d0e3296171d0f55dbf8235476005b471331620ac0fe105faa9707a?
s=60&d=retro&r=g)

### 󠀁[Instructions](https://wordpress.org/support/topic/instructions-40/)󠁿

 [denchik35](https://profiles.wordpress.org/denchik35/) 2020 年 9 月 14 日 1 回复

No instructions. Инструкцию надо добавлять

![](https://secure.gravatar.com/avatar/632af02549da980d5f6ef9c6b57e69a68dad99be1ceaa3b7c81877cfd95ef395?
s=60&d=retro&r=g)

### 󠀁[Good job](https://wordpress.org/support/topic/good-job-1303/)󠁿

 [gorinileonardo](https://profiles.wordpress.org/gorinileonardo/) 2020 年 8 月 1
日

The solution I was looking for. Simple intuitive and fast

![](https://secure.gravatar.com/avatar/690eb0c833034defbb428eca729ddf8f1d9307334de0e51e932a458db0be4eaa?
s=60&d=retro&r=g)

### 󠀁[Very useful and simple to use](https://wordpress.org/support/topic/very-useful-and-simple-to-use-7/)󠁿

 [massimorigoni](https://profiles.wordpress.org/massimorigoni/) 2020 年 7 月 28 
日

If I can afford a suggestion I would add the possibility of distinguishing the different
roles. Anyway it was useful to me.

![](https://secure.gravatar.com/avatar/0750c31ad2e4acbd1e971a549974bf676de83ffafccd57e2dd7e2139fdd9e88d?
s=60&d=retro&r=g)

### 󠀁[Perfect!](https://wordpress.org/support/topic/perfect-7508/)󠁿

 [Jose Mortellaro](https://profiles.wordpress.org/giuse/) 2020 年 7 月 27 日

Perfect when you don’t need a complicated membership plugin, but in the same time,
you want to display different content for logged-in users. Good job!

 [ 阅读所有5条评价 ](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/)

## 贡献者及开发者

「Hide/Show Post/Page Content」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ sosidee ](https://profiles.wordpress.org/sosidee/)

「Hide/Show Post/Page Content」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/hideshow-postpage-content/contributors)
为本插件所做的贡献。

[帮助将「Hide/Show Post/Page Content」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/hideshow-postpage-content)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/hideshow-postpage-content/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/hideshow-postpage-content/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/hideshow-postpage-content/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/hideshow-postpage-content/)。

## 更新日志

#### 1.5.4

 * Updated the custom library

#### 1.5.3

 * Added a workaround to load the core file ‘pluggable.php’ before using the cache_users()
   function [WordPress 6.1 bug]

#### 1.5.2

 * Updated the internal php library

#### 1.5.1

 * Fixed a PHP notice in the info page
 * Updated the internal php library

#### 1.5

 * Added the do_shortcode() function to allow nested shortcodes
 * Minor fixes and changes

#### 1.4

 * Added shortcode parameters to select logged users by role or username
 * Minor changes

#### 1.2

 * Configured the localization settings
 * Added the italian translation

#### 1.1

Implemented the compatibility with Elementor 2.x

#### 1.0

First release

## 额外信息

 *  版本 **1.5.4**
 *  最后更新：**1 年前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 5.9 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 8.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/hideshow-postpage-content/) 和 [Italian](https://it.wordpress.org/plugins/hideshow-postpage-content/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/hideshow-postpage-content)
 * 标签
 * [hide content](https://cn.wordpress.org/plugins/tags/hide-content/)[hide text](https://cn.wordpress.org/plugins/tags/hide-text/)
   [show content](https://cn.wordpress.org/plugins/tags/show-content/)
 *  [高级视图](https://cn.wordpress.org/plugins/hideshow-postpage-content/advanced/)

## 评级

 4.6 星（最高 5 星）。

 *  [  4 条 5 星评价     ](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/hideshow-postpage-content/reviews/)

## 贡献者

 *   [ sosidee ](https://profiles.wordpress.org/sosidee/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/hideshow-postpage-content/)