Extra Sentence Space


Even though you may add two spaces after each sentence when writing a post (assuming you subscribe to a writing style that suggests such spacing) web browsers will collapse consecutive blank spaces into a single space when viewed. This plugin adds a   (non-breaking space) after sentence-ending punctuation to retain the appearance of your two-space intent.

NOTE: The plugin will only enforce the two-space gap in places where two or more spaces actually separate sentences in your posts. It will NOT insert a second space if only one space is present.

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage


The plugin is further customizable via two filters. Typically, these customizations would be put into your active theme’s functions.php file, or used by another plugin.


The ‘c2c_extra_sentence_space’ filter allows you to use an alternative approach to safely invoke c2c_extra_sentence_space() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site. This only applies if you use the function directly, which is not typical usage for most users.


Instead of:

<?php echo c2c_extra_sentence_space( $mytext ); ?>


<?php echo apply_filters( 'c2c_extra_sentence_space', $mytext ); ?>


The ‘c2c_extra_sentence_space_punctuation’ filter allows you to customize the punctuation, characters, and/or symbols after which double-spacing (when present) is preserved. By default these are ‘.!?’.


  • $punctuation (string): The default characters after which double-spacing should be preserved. Default is ‘.!?’.


add_filter( 'c2c_extra_sentence_space_punctuation', 'more_extra_space_punctuation' );
function more_extra_space_punctuation( $punctuation ) {
    // Add the '/' and ')' characters to the list of characters
    return $punctuation . '/)';


  1. Install via the built-in WordPress plugin installer. Or download and unzip extra-sentence-space.zip inside the plugins directory for your site (typically wp-content/plugins/)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. Begin (or continue) to use two spaces to separate your sentences when writing a post.


Installation Instructions
  1. Install via the built-in WordPress plugin installer. Or download and unzip extra-sentence-space.zip inside the plugins directory for your site (typically wp-content/plugins/)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. Begin (or continue) to use two spaces to separate your sentences when writing a post.
What text does this plugin modify (aka filter)?

This plugin potentially modifies the post content, excerpt, title, comment text, and widget text.

Why do my sentences still appear to be separated by only one space despite the plugin being active?

Did you use two spaces to separate the sentences when you wrote the post? This plugin only retains the appearance of those two spaces when the post is viewed in a browser; it does not insert a second space if there wasn’t one originally present.

Can I enforce double-spacing after other types of punctuation?

Yes. See the Filters section for an example of the code you’ll need to use.

Does this plugin include unit tests?




I exported my WordPress 4.9.8 database, added 2 spacebar clicks after all end-of-sentence punctuation marks, and imported. Well, this plugin does nothing. Complete waste of time. Either fix this thing or remove it!
Read all 2 reviews

Contributors & Developers

“Extra Sentence Space” is open source software. The following people have contributed to this plugin.


Translate “Extra Sentence Space” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.


1.3.6 (2018-04-14)

  • New: Add README.md
  • Change: Minor whitespace tweaks to unit test bootstrap
  • Change: Add GitHub link to readme
  • Change: Modify formatting of hook name in readme to prevent being uppercased when shown in the Plugin Directory
  • Change: Note compatibility through WP 4.9+
  • Change: Update copyright date (2018)

1.3.5 (2017-01-30)

  • Change: Default WP_TESTS_DIR to /tmp/wordpress-tests-lib rather than erroring out if not defined via environment variable.
  • Change: Enable more error output for unit tests.
  • Change: Prevent direct loading of test file.
  • Change: Note compatibility through WP 4.7+.
  • Change: Minor inline code documentation reformatting.
  • Change: Minor readme.txt improvements.
  • New: Add LICENSE file.
  • Change: Update copyright date (2017).

1.3.4 (2015-12-15)

  • Change: Note compatibility through WP 4.4+.
  • Change: Explicitly declare methods in unit tests as public.
  • Change: Update copyright date (2016).
  • Add: Define ‘Text Domain’ header attribute.
  • Add: Create empty index.php to prevent files from being listed if web server has enabled directory listings.

1.3.3 (2015-08-16)

  • Update: Note compatibility through WP 4.3+
  • Update: Minor documentation tweaks (spacing)

1.3.2 (2015-02-11)

  • Note compatibility through WP 4.1+
  • Update copyright date (2015)

1.3.1 (2014-08-25)

  • Fix minor error in tests
  • Minor plugin header reformatting
  • Minor code reformatting (spacing)
  • Change documentation links to wp.org to be https
  • Note compatibility through WP 4.0+
  • Add plugin icon

1.3 (2013-12-14)

  • Fix bug if using ‘/’ as custom-defined punctuation
  • Add unit tests
  • Note compatibility through WP 3.8+
  • Update copyright date (2014)
  • Add banner
  • Minor readme.txt formatting tweaks
  • Change donate link


  • Add check to prevent execution of code if file is directly accessed
  • Note compatibility through WP 3.5+
  • Update copyright date (2013)


  • Re-license as GPLv2 or later (from X11)
  • Add ‘License’ and ‘License URI’ header tags to readme.txt and plugin file
  • Remove ending PHP close tag
  • Note compatibility through WP 3.4+
  • Minor code reformatting (indentation)
  • Update copyright date (2012)


  • Note compatibility through WP 3.3+


  • Note compatibility through WP 3.2+
  • Tiny code formatting change (spacing)
  • Fix plugin homepage and author links in description in readme.txt


  • Add link to plugin homepage to description in readme.txt


  • Note compatibility with WP 3.1+
  • Update copyright date (2011)


  • Add filter ‘c2c_extra_sentence_space_punctuation’ to allow customization of the punctuation after which double-spacing (when present) is preserved. Default is ‘.!?’
  • Add filter ‘c2c_extra_sentence_space’ to respond to the function of the same name so that users can use the apply_filters(‘c2c_extra_sentence_space’) notation for invoking function
  • Wrap function in if (function_exists()) check
  • Note compatibility with WP 3.0+
  • Minor code reformatting (spacing)
  • Remove docs from top of plugin file (all that and more are in readme.txt)
  • Remove trailing whitespace in header docs
  • Add Filters and Upgrade Notice sections to readme.txt


  • Also filter ‘widget_text’
  • Now also filter widget_text
  • Add PHPDoc documentation
  • Note compatibility with WP 2.8+ and 2.9+
  • Update readme.txt (including adding Changelog)


  • Note compatibility with WP 2.6+ and 2.7+
  • Update copyright date
  • Tweak description and extended description
  • Remove commented out line of code that could be used to insert a second space if two aren’t present
  • Update and fix some mis-worded sentences in readme.txt


  • Initial release