[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

bw_autop – Dynamically re-enable/disable automatic paragraph generation

Dynamically re-enable/disable automatic paragraph generation

With the oik-css plugin you can choose to disable automatic paragraph generation across the whole site. Or you can control it manually using the [bw_autop] shortcode.

When you first install oik-css (v0.7 or higher) the default is to continue to allow automatic paragraph generation. i.e. The checkbox is not ticked.

In this situation, WordPress will automatically create paragraphs around un-styled content.

Sometimes, especially when there are lots of shortcodes, this causes a problem. The generated HTML becomes unwieldly and difficult to style… or worse.

When the checkbox is ticked, the automatica paragraph creation logic is disabled. But this can lead to another problem. If you don’t specifically add paragraph tags then all the content can become scrunched up.

The nice little space you left has now disappeared!

And to compound the problem, when using the Visual editor, you can’t easily wrap your lines in paragraph tags. Selecting the Paragraph button simply removes any previous tag and replaces it with nothing. And if you do type p tags in the Text editor switching back to the Visual editor often causes them to disappear again.

To help in this regard oik-css supplies the bw_autop shortcode to override the global behaviour.

Disabled? Shortcode in content Automatic paragraphs?
No None
No [bw_autop]
No [bw_autop off]
Yes None
Yes [bw_autop]
Yes [bw_autop off]

Note: The current value of the Disable automatic paragraph creation checkbox is Yes

Since we always want you to be able to read this with automatically generated paragraphs we’re using…


[bw_autop]
 

Published: October 14, 2014 | Last updated: October 12, 2015

Information

Shortcode: bw_autop
Plugin ref: oik-css
Version: 2.1.0
Enclosed content shortcode? Needs [/code]?: No
Expands in 'the_title'?: No
Letters:

Syntax

[bw_autop
autop,0="true| false - Re-enable/disable automatic paragraph generation"]

Shortcode examples

  • Using bw_autop to disable automatic paragraph creation
  • Using bw_autop to enable automatic paragraph generation

Related pages and posts

Pages
    Posts
      Posts related by tag
        Posts related by category name

          Plugins

          • All Plugins
          • oik base plugin
          • FREE oik plugins
          • WordPress plugins
          • Premium oik plugins

          Themes

          • FREE themes
          • Bespoke themes
          • Premium themes

          Blocks

          • All Blocks
          • Block examples
          • About Blocks

          Shortcodes

          • All Shortcodes
          • Shortcode examples
          • About Shortcodes

          Reference

          • About APIs
          • All APIs
          • All Classes
          • All Files
          • All Hooks

          Support

          • Contact
          • Cookies policy
          • Get API key
          • Privacy
          • Request support
          • Sitemap
          • Stay informed
          • Terms and Conditions
          oik-plugins
          Email: oikplug@oik-plugins.com

          Weight shipping plugins

          Find out which cart weight shipping plugin you need for your WooCommerce site.
          Which cart weight based plugin do I need?

          Site:  www.oik-plugins.com
          © Copyright oik-plugins 2011-2023. All rights reserved.


          Website designed and developed by Herb Miller of Bobbing Wide
          Proudly powered by WordPress and oik-plugins
          WordPress 6.1.1. PHP: 7.4.33. Memory limit: 768M