var _gaq = _gaq || []; _gaq.push([\'_setAccount\', \'UA-13211647-1\']); _gaq.push([\'_trackPageview\']); (function() { var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true; ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\'; var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s); })();

single shortcode plugin 0.1 released

single shortcode plugin 0.1 is released.

single shortcode plugin

Introduction

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

For more information, see single shortcode plugin Official Site.

Usage

Enclose content with [single] tag.

[single] ... [/single]
[single]
 ...
[/single]

You can use [excerpt] tag as necessary.

[excerpt] ... [/excerpt]
[excerpt]
 ...
[/excerpt]

Download

Version
0.1.1 (2011-08-30)
Author
attosoft
License
GNU General Public License, version 2 (GPL-2.0)
Requires
WordPress 2.5 or higher
Compatible up to
WordPress 3.2.1

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

Post Tagged with ,

3 Responses so far.

  1. attosoft says:
    version 0.1.1
    [excerpt] ショートコード:検索結果や投稿フィード (RSS/Atom) にも内容を出力する
  2. shaid says:

    Shortcode Press is another wordpress shortcode plugin which is also useful to insert custom shortcodes within post or page to give a new look. here it uses custom tinymce button to insert codes from editor.

Leave a Reply

Your email address will not be published.