ECI: Shortcodes   

May 31st, 2011 // In: Easy CSV Importer // By: Comments 0

Shortcodes allow advanced actions to be performed when someone opens a post. The shortcode will usually display content and the function for a shortcode may obtain the value required, possibly a random value or maybe even a calculation of some sort. This allows part of your post to be dynamic and change over time.

Using Shortcodes in ECI for WordPress

Features

Standard Shortcodes

This plugins Standard Shortcodes pull data from Custom Fields. If a shortcodes column name does not have a matching Custom Field key within the post, nothing will be displayed at all. You must make all Custom Fields for every column of data you plan to use as a Shortcode. Note that this is not the rule for Tokens.

Label Null Value Swap/Replace Shortcodes

This shortcode is ideal for lists, such as product specifications or sub-titles especially if it indicates some sort of status i.e. sold, on sale or new. The shortcode has a column value, this is the column name that should also be used in a Custom Field to make this work. There is a value named label, enter the value you want to be displayed as a label or pre-pend text to the data value being added. The next value is the “nullaction” and this is what you want the shortcode to do if the data value turns out to be blank. Currently there are two choices,delete the slash and delete the word you do not want as your action. The “delete” action will simply display nothing at all, in other words having a delete effect on the shortcode. The “swap” action will return a default value. The default value to be displayed is “nullswap” and you may enter anything you wish for this. The “nullswap” is not required if your nullaction is delete. This shortcode could be more flexible if the need arises, just contact me for upgrades.

Text Spinning Shortcodes

Text spinning is easier than you might think. A text spinning shortcode returns one of many values you enter into your shortcode. You may enter as many separate values as you need and they must be seperated by a comma. You may use single words, sentences and even use html which can be handy if you wish to display a link in some cases but not others. Example: [ecispin values="brilliant,great,amazing,impressive"]

Read more about Text Spinning with Easy CSV Importer

Tags: - - -

Leave a Reply

You must be logged in to post a comment.