Placing Content Blocks Using Shortcodes
The simplest way to embed content blocks within posts and pages is by using shortcodes. In fact, shortcodes can be used outside of the main content area so long as the theme you use performs shortcode processing in those areas.
The basic shortcode syntax is as follows, making reference to your content block either using its ID or slug, using the following format:
[ls_content_block id="<ID>"] [ls_content_block slug="<SLUG>"]
You can also use the “para” parameter, which gives you greater control over how the content is filtered. For example:
[ls_content_block id="<ID>" para="<PARA>"] [ls_content_block slug="<SLUG>" para="<PARA>"]
See this section for full information regarding content processing and the PARA parameter.
The basic shortcode for each content block can be found on the main Content Blocks page. A more extensive list of the shortcodes can be found on the edit page for the specific block.
The plugin provides a shortcode generator dialog box available from the WordPress TinyMCE editor window. To use it, place the cursor where you want the code to be inserted within the editor and click the Loomisoft logo.
The generator dialogue box allows you to select:
- The required content block from those available
- The desired content processing (See this section for full information regarding content processing and the PARA parameter)
- Whether the ID or the slug should be used
Once you click “Insert”, the correct shortcode is inserted into the editor.