Shortcode: [shortcoder] – X-Plus
Shortcoder
Shortcoder – [ shortcoder]
[ shortcoder id="myname" v1="optional-replacement" ... v9="replacement"]
The shortcode allows you to define your own named shortcodes. These really serve as “macros” – an easy way to define constant text or other fixed content you would like to add to your pages, posts, or widget areas. The content you define can include other shortcodes and basic HTML, as well as Raw HTML or Scripts if you have the role permissions to do that.
[ shortcoder] supports nine (9) optional parameters, v1 to v9, that allow you to pass values to your shortcode definition text. The value of any parameter will replace the equivalent parameter specified as %v1% in your text. For example, if you had a shortcode “name” and definition text contained “My name is %v1%.”, and you use the shortcode [ shortcoder id=”name” v1=”Bruce”], the output included in your content would be “My name is Bruce.” This allows you to use the same shortcode in different pages or posts and supply variable content.
Example:
Shortcode ID: link
Shortcode definition: More information available <a href=”%v1%”>here</a>.
Usage (from a post, for example):
This is an simple example. [ shortcoder id=”link” v1=”http://example.com/info.html”] Check it out.
Example 2:
Another great use for [ shortcoder] is to easily include scripts provided by outside services. For example, if you have a Twitter account, you can login to your Twitter account and go to the http://twitter.com/about/resources page. There you will find tools to generate follow buttons, widgets, and more.
If you create a Widget, for example, Twitter will display a box with JavaScript code to paste into your site. The easiest way to do this with Weaver Xtreme Plus would be to create a shortcoder definition called “twitter”. Then simply paste the code you got from Twitter into the definition of the “twitter” shortcoder definition. Now you can easily display the Twitter widget using the shortcode [ shortcoder id=”twitter”] almost anywhere on your site – posts, pages, text widgets, even HTML insertions. No fuss with Raw HTML for pages or posts, or keeping track of text widgets. Just a simple shortcode you can use over and over.