這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

single shortcode

外掛說明

Using single shortcode plugin, you can hide specified content from excerpt of post. The content enclosed with [single] tag is output only if single page is displayed. It’s useful for hiding the following items from excerpt.

  • table of contents
  • footnotes
  • relative links, etc.

Installed this plugin, you can use the following shortcodes.

  • [single] shortcode outputs content only if single page is displayed
  • [excerpt] shortcode outputs content only if excerpt is displayed

Usage

Enclose content with [single] tag.

[single] ... [/single]

[single]
 ...
[/single]

You can use [excerpt] tag as necessary.

[excerpt] ... [/excerpt]

[excerpt]
 ...
[/excerpt]

Example

If you write the following code,

<p>paragraph1</p>

[single]
<h5>Index</h5>
<ul>
    <li><a href="#item1">item1</a></li>
    <li><a href="#item2">item2</a></li>
    <li><a href="#item3">item3</a></li>
</ul>
[/single]

<p>paragraph2</p>

the excerpt is displayed as follows. (Index is NOT output)

paragraph1

paragraph2

And single page is displayed as follows. (Index is output)

paragraph1

Index

paragraph2

Links

安裝方式

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

常見問題集

Where is excerpt displayed?
  • Blog homepage (latest posts)
  • Archive, Category, Tag page
  • Search result
  • Posts feed (RSS/Atom)

* Please see Glossary for more information.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈single shortcode〉的開發相關工作。

參與者

將〈single shortcode〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.1.1

  • [excerpt] shortcode also outputs content in search results and posts feed (RSS/Atom)

0.1

  • Initial release