Title: Show/Hide Shortcode
Author: Lars Wallenborn
Published: <strong>2021 年 3 月 28 日</strong>
Last modified: 2025 年 1 月 3 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/showhide-shortcode.svg)

# Show/Hide Shortcode

 作者：[Lars Wallenborn](https://profiles.wordpress.org/larsborn/)

[下载](https://downloads.wordpress.org/plugin/showhide-shortcode.1.0.1.zip)

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

 [支持](https://wordpress.org/support/plugin/showhide-shortcode/)

## 描述

This plugin allows you to easily add “Show more…” links to your site. Just enclose
the content to be hidden between `[showhide]` and `[/showhide]`. There is no modification
to the backend or fancy editor. Hence the code for this plugin is minimal and the
plugin should be easy to review for security issues as well not impact performance.

## 屏幕截图

[⌊Example view of the block editor.⌉⌊Example view of the block editor.⌉[

Example view of the block editor.

## 常见问题

### Where do I need to click?

Use the block editor to add two blocks: `[showhide]` and `[/showhide]`. Everything
in between will be hidden and a link “Show more…” is displayed. When clicked, the
hidden content is revealed.

### Can I change the default “Show more…” text?

Yes, the `[showhide]` shortcode accepts the argument `show_caption`: `[showhide 
show_caption="Do you want to know more?"]Your Content[/showhide]\`\`\` Similarly,
use the`hide_caption` attribute to change the “Show less…” default caption.

## 评价

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

### 󠀁[Efficient and simple](https://wordpress.org/support/topic/efficient-and-simple-12/)󠁿

 [oldteaowl](https://profiles.wordpress.org/oldteaowl/) 2025 年 2 月 19 日

Efficient and simple, love it

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

### 󠀁[It simply works](https://wordpress.org/support/topic/it-simply-works-60/)󠁿

 [rolzan](https://profiles.wordpress.org/rolzan/) 2021 年 7 月 21 日

No clutter, it simply works as it is intended. It would be better though if you 
could write this in vanilla JavaScript rather than relying to jQuery.

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

### 󠀁[Love the simlicity.](https://wordpress.org/support/topic/love-the-simlicity/)󠁿

 [vtchernoff](https://profiles.wordpress.org/vtchernoff/) 2021 年 4 月 2 日

It works.

 [ 阅读所有3条评价 ](https://wordpress.org/support/plugin/showhide-shortcode/reviews/)

## 贡献者及开发者

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

贡献者

 *   [ Lars Wallenborn ](https://profiles.wordpress.org/larsborn/)

[帮助将「Show/Hide Shortcode」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/showhide-shortcode)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.1

 * Updated “Tested up to” field to reflect current
 * Addresses XSS vulnerability in `show_caption` and `hide_caption` arguments

#### 1.0.0

 * Initial Release

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**1 年前**
 *  活跃安装数量 **200+**
 *  WordPress 版本 ** 5.7 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 7.3 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/showhide-shortcode/)
 * 标签
 * [expander](https://cn.wordpress.org/plugins/tags/expander/)[read less](https://cn.wordpress.org/plugins/tags/read-less/)
   [Read more](https://cn.wordpress.org/plugins/tags/read-more/)[show more](https://cn.wordpress.org/plugins/tags/show-more/)
 *  [高级视图](https://cn.wordpress.org/plugins/showhide-shortcode/advanced/)

## 评级

 5 星（最高 5 星）。

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

[Your review](https://wordpress.org/support/plugin/showhide-shortcode/reviews/#new-post)

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

## 贡献者

 *   [ Lars Wallenborn ](https://profiles.wordpress.org/larsborn/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/showhide-shortcode/)