=== Plugin Name === Contributors: Loomisoft Donate link: http://www.loomisoft.com/make-a-contribution/ Tags: content blocks, text blocks, reusable content, reuusable content widget, reusable text, reuusable text widget Requires at least: 3.0.1 Tested up to: 4.6.1 Stable tag: 1.0.2 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl.html This plugin allows users to define modular blocks of text/content and place them in pages, posts, sidebars, etc. via shortcodes, widgets or PHP. == Description == Loomisoft's Reusable Content & Text Blocks plugin allows you to define modular and repeated blocks of text and other content and place them within pages, posts, sidebars, widgetised areas or anywhere on your site via shortcodes, via the provided widget or via PHP. The idea behind this plugin is two-fold. The first is to modularise content so you can use the same content in multiple pages, posts and other places. The second is to provide an easy way to add complex custom content within sidebars and widgets. = Features = * Uses WordPress custom post type and custom post management to define reusable content blocks * Allows the use of shortcodes, widgets and PHP to place content blocks into pages, posts, sidebars, widgetised areas or anywhere on your site * Provides a widget to place content blocks into sidebars and other widgetised areas * Compatible with some page design plugins (e.g. Visual Composer) * Provides a number of other useful shortcodes to place dynamic text (e.g. date/time, site title, page title) into posts = Defining content/text blocks = Content or text blocks can be added and managed via the custom "Content Blocks" post type. Once defined, they can be used in your posts, pages and other areas in your site. = Shortcodes = Content blocks can be added to your pages, posts or anywhere in your site that accepts shortcodes by using the content block's post ID or slug using the following format: > [ls_content_block id="*<ID>*"] > [ls_content_block slug="*<SLUG>*"] You can also have the normal WordPress paragraphs added automatically by having: > [ls_content_block id="*<ID>*" para="yes"] > [ls_content_block slug="*<SLUG>*" para="yes"] = Widgets = A custom widget is provided so you can easily add content blocks to your sidebars and other widgetised areas. = Access via PHP = Content blocks can be added to your customised theme pages via PHP using the following code: > <?php echo $ls_content_blocks->get_block_by_id( *<ID>* ); ?> > <?php echo $ls_content_blocks->get_block_by_slug( '*<SLUG>*' ); ?> To have the normal WordPress paragraphs added automatically, use: > <?php echo $ls_content_blocks->get_block_by_id( *<ID>*, true ); ?> > <?php echo $ls_content_blocks->get_block_by_slug( '*<SLUG>*', true ); ?> = Use of Visual Composer within content blocks = The Loomisoft content blocks are designed to allow the use of the Visual Composer editor. To do this, you will need to enable the "lscontentblock" post types within Visual Composer Role Manager. However, please note that settings you specify within an element's "Design Options" (e.g. margins, paddings, borders, background, etc.) will not show in the front end. This is because of the way Visual Composer labels these as custom CSS settings related to the containing post - in this case the content block post and not the page/post where it appears. The best way to customise these design options is to label the element with an "Extra class name" or "Row ID" and then add these to a custom CSS. = Content blocks within content blocks = If needed, content blocks can be used within other content blocks via shortcodes as described above. A safety feature has been written into this plugin to suppress circular references. = Other useful shortcodes = This plugin also provides the following useful shortcodes, which can be used within content blocks as well as other places such as pages/posts: **Date & time:** (Using the standard PHP date format strings - see http://php.net/manual/en/function.date.php) > [ls_content_block datetime="*<DATE/TIME FORMAT>*"] **Site title:** (As set in WordPress admin area - Settings > General) > [ls_content_block info="site-title"] **Title of current page/post:** (Note that this is the raw title of the page/post and not the same as the title within the HTML <title> tag, which can be changed by SEO plugins) > [ls_content_block info="page-title"] == Installation == 1. Upload the plugin files to the '/wp-content/plugins/loomisoft-content-blocks' directory, or install the plugin through the WordPress plugins screen directly. 1. Activate the plugin through the 'Plugins' screen in WordPress 1. Full usage information may be found in Content Blocks > Usage & About == Frequently Asked Questions == = Are Content Blocks easy to add and edit? = Yes. Content Blocks set up a custom post type and use the WordPress native editor. = Can Content Blocks be placed anywhere on a site = Content Blocks can be placed within post/page content, within sidebars, and other areas via shortcode, via widgets and via PHP. = Is there a limit to the number of times a Content Block can be used = No. = Can Content Blocks be used other Content Blocks? = Yes. The normal shortcode can be used. However, a safeguard function has been built into the plugin to avoid circular references (e.g. Content Block A referred to ontent Block B and vice versa). = Can Complex Editors be used in Content Blocks? = Yes. Editors such as Visual Composer and Fusion Builder can be used as long as they are set up to. For example, in the case of Visual Composer, you will need to enable the "lscontentblock" post types within Visual Composer Role Manager. However, there may be slight limitations. For example, settings you specify within an element's "Design Options" (e.g. margins, paddings, borders, background, etc.) will not show in the front end. This is because of the way Visual Composer labels these as custom CSS settings related to the containing post - in this case the content block post and not the page/post where it appears. The best way to customise these design options is to label the element with an "Extra class name" or "Row ID" and then add these to a custom CSS. == Screenshots == 1. List of Content Blocks custom post type 1. Edit screen for Content Block 1. Access details listed for Content Block 1. Widget for placing Content Block into sidebars, widget bars == Changelog == = 1.0.2 = * Launch version == Upgrade Notice ==