single shortcode

single shortcode Install Statistics

0
100%
Today: 0 Yesterday: 0 All-time: 2,450 downloads
single shortcode Icon

Try plugin: single shortcode

We'll create fresh WordPress site with single shortcode installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About single shortcode

[single] shortcode outputs content only if single page is displayed. Useful for hiding table of contents, footnotes, relative links from excerpt.

0


0


0


0


0

updated: 13 years ago
since: 13 years ago
author: attosoft

Description

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