LibriDirect Shortcodes
Built into your website there is a highly flexible and easily customisable system for displaying different types of data as part of nearly any page or post. This is accomplished by inserting into the page a short snippet of code called a "shortcode".
When WordPress displays the page it replaces the shortcode with the piece of content the shortcode asks for. The LibriDirect plugin makes a number of shortcodes available for outputting various data onto sites. Most of these shortcodes include a number of different options.
How to use shortcodes
Shortcodes can be placed into the content of posts and pages. When WordPress processes the content it will replace the shortcode with the right HTML code to display what you’re asking for.
Shortcodes are encased in square brackets “[…]” and start with a name. For example you might embed a gallery using this shortcode:
[book_slideshow]
They can also be used with additional attributes. These consist of a key and a value separated by an equals sign. The value should be enclosed in double quotes. For example:
[book_slideshow sku_id="123" sort_by="added" sort_order="desc"]
Available shortcodes
These are the shortcodes that the current version of the plugin makes available. Click on the shortcode name for more details.
- book_slideshow – Book images move across the screen or faded in succession. Also called a "carrousel".
- book_cart – Displaying the shopping cart. This should only be used on the checkout pages.
- book_listing – Display a list of books. Used for browsing books and also displaying search results.
- book_search_box – Show a simple search box.
- book_showcase – This shortcode displays a dynamic grid of book images. It’s a gorgeous way of browsing books and it’s definitely worth trying it out on your site.
- book_grid – Display a grid of books.
- book_search_link – displays a link to the search results page
- book_tag_list – displays a list of tag links in alphabetical order