sandywp / plugins / sierotki

Orphans

5.0 out of 5 stars. 5.0 164 reviews

Supports the grammar rule for orphan words at the end of a line.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v3.4.4 50,000+ installs WP 6.0+ PHP 8.0+

your-sandbox.sandywp.com/wp-admin
Orphans running inside a SandyWP sandbox

What you get inside

4 screens
  • Options for entries.

  • Options for widgets.

  • Options for taxonomies.

  • Miscellaneous options.

About this plugin

The Orphans plugin automatically improves the typography of your WordPress site by preventing single-letter or very short words—known as orphans—from appearing alone at the beginning of a line. By replacing the space after these words with a non-breaking space, the plugin ensures cleaner, more professional-looking text layouts, especially for languages like Polish where such typographic rules are important.

What are Orphans?

An orphan in typography is a short word (often a single character) left isolated at the beginning of a line, separated from the rest of the sentence. This is considered a composition error and can negatively affect readability and the visual appeal of your content.

Key Features

  • Automatic Orphan Fixing: Scans your content and replaces spaces after short words (orphans) with non-breaking spaces, preventing them from being separated by line breaks.
  • Customizable: Easily modify which words are treated as orphans using filters, or provide your own list of orphan terms.
  • Non-Destructive: The plugin does not alter your original content in the database; changes are applied only when content is displayed.
  • Builder and Plugin Integration: Seamless compatibility with popular page builders like Bricks, Divi, Muffin (beTheme), WPBakery, and Advanced Custom Fields.
  • Flexible Usage: Apply orphan fixes to custom fields or any string using provided filters.

How It Works

Once activated, Orphans automatically processes your posts, pages, and other content post types, fixing orphaned words on the fly. You can customize its behavior through the settings panel found under Appearance > Orphans, or extend functionality with WordPress filters for advanced use cases.

Ideal For

  • Bloggers, publishers, and editors seeking to maintain high typographic standards.
  • Sites in languages (like Polish or Czech) where orphan control is a common publishing requirement.
  • Anyone wanting to enhance the professional appearance and readability of their WordPress content.

Open Source & Developer Friendly

Orphans is open source, actively maintained, and available on GitHub for those interested in contributing or extending its features.

Asset image

Manuscript by Muffet, on Flickr

Questions

When does this plugin replace spaces?

Plugin works when viewing the content and does not modify your content.

I have a problem with the plugin, or I want to suggest a feature. Where can I do this?

You can do it on Support Threads, but please add your ticket to Github Issues.

How to use this plugin on the custom field?

Use orphan_replace filter. Example code:

$value = apply_filters(
    'orphan_replace',
    get_post_meta($post_id, 'meta_key', true )
);

How to use this plugin on any string?

Use orphan_replace filter. Example code:

$value = apply_filters( 'orphan_replace', 'any string' );

How to change plugin capability?

By default to using this plugin you must have manage_options capability, which usually means site administrator. If you want to allow manage Orphans by “Editors” then you need to use other capabilities, e.g. unfiltered_html. You can use iworks_orphans_capability filter:

add_filter('iworks_orphans_capability', 'my_orphans_capability');
function my_orphans_capability($capability) {
    return 'unfiltered_html';
}

How to turn of replacement in my piece of code?

At the beginning of your block just add:

add_filter( 'orphan_skip_replacement', '__return_true' );

and at the end, to again turn on replacements:

remove_filter( 'orphan_skip_replacement', '__return_true' );

How can I change default orphans?

Please use iworks_orphan_terms filter. It is array of default orphans. You can remove, add or even replace whole array. For example, to remove words “oraz”, “na” and “”nie”, use code bellow:

add_filter( 'iworks_orphan_terms', 'remove_iworks_orphan_terms' );
function remove_iworks_orphan_terms( $terms ) {
    $default_orphans_to_remove = array( 'oraz', 'na', 'nie', );
    foreach( $default_orphans_to_remove as $value ) {
        if ( $key = array_search( $value, $terms ) ) {
            unset( $terms[ $key ] );
        }
    }
    return $terms;
}

How can I change the default orphan file?

The default file with definitions is located in the etc/ directory.

You can change it using the filter iworks_orphan_own_terms_file:

`
add_filter(
‘iworks_orphan_own_terms_file’,
function( $file ) {
return ‘<own path to file’;
}
);

5.0

164 reviews

  • 5 ★ 164
  • 4 ★ 0
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 0

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.