开发者 | allonsacksgmailcom |
---|---|
更新时间 | 2018年12月25日 18:13 |
捐献地址: | 去捐款 |
PHP版本: | 5.6 及以上 |
WordPress版本: | 5.0.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/plugin-name
directory, or install the plugin through the WordPress plugins screen directly.Page builders are not recommended as they can clash when being used from within a shortcode or on other pages. It is best to use the Wordpress HTML or WYSIWYG editor or even better just use the HTML block provided with this plugin. If you want to try using a page builder, it still may work in some cases but you may lose compatibility in the future. (You have been warned :) ) If you use a page builder and do not see the option to use it on the content block edit screen, you may need to enable it for the post type: Dev Content Blocks. (Depends if your page builder supports custom post types). Take into account that some page builders output the style per page and not inline meaning that styling may not be visible in the shortcode output. Tested with Divi Builder it works if you also enable Divi Builder on the destination page itself. (But Divi Builder default CSS might over ride your custom CSS set in the shortcode) Tested with Elementor the styling done in Elementor does not come through as it is only generated on the page the element was generated on. (The content block page not the destination page using the shortcode pointing to the content block.)
While logged into the admin you can see a preview of the content block by clicking the "view Content Block" link, or the URL below the title, or the "Preview Changes" button in the post publish meta section. Same as previewing any page or post. = I am logged into the admin but get a 404 page when previewing the content block. In the admin visit "Settings" > "Permalinks" in order to activate the CPT preview screen.
No: The content will not be visible, previewing the content block is only possible if you are logged into the admin. Non logged in visitors will receive a 404 page if they were to for some reason have access to the URL of the content block. Content blocks are only meant to be used as a shortcode to output content within another post type or area of the site. The post type has "public" set to "false" so it should not be in the sitemap but you should check whatever generates your sitemap and make sure the "Dev Content Blocks" post type does not appear there.
The shortcodes are displayed at the top of the content block edit screen below the title. It is highly advised to use the ID of the shortcode for instance [dcb id=4] as the ID will not change however for convenience you can use the slug in two easy to remember formats eg: [dcb name=tests] or [dcb slug=tests]. You really have no reason to change the slug even if you change the title so it is safe enough but ID is the mot reliable.
No problem! Only the boxes you enter content into will be included in the output
No, you can simply toggle the switch in the content editor section to allow or disallow output from the default WP editor. (This section should appear below the "Content Block Code" section)
The plugin is designed to first output the code from the WP editor and then from the HTML box. If you need to have arbitrary raw HTML within the WP editor then create a separate content block and insert that into the WP editor in the current content block (Yes you can nest different content blocks within each other). You can also nest another content block's shortcode in the HTML editor box.
The preview tries to use a blank page with just the header, content area, and the footer but different themes might clash with that. Please email me if you have any issues and I will try to assist. Optionally you could just insert the shortcode into a test page, preview there, and when it is ready copy the shortcode to the actual page you want to use it on. Also note, the content may look differently on different template pages based on the container width.
As you type suggestions should appear, just hit TAB to accept the suggestion or the arrow buttons on your keyboard to select a different suggestion.
This is by design to enable fast scrolling to the end of the text box without worrying about losing focus when you reach the end of the box. If you want to continue scrolling the page, either wait for the scrollbar in the textbox to disappear (after about a second) or move the mouse away from the textbox. = I use a page builder that already has modular sections, do I have a use for this plugin? Yes! There are a few reasons: