Text Replace

Text Replace

Wordpress plugin

Install on Wordpress

App Details

This plugin allows you to easily define text or HTML that should be used in your posts in place of words or phrases that are actually present in the posts. This is a handy technique for creating shortcuts to common, lengthy, or frequently changing text/HTML, or for smilies.

Additional features of the plugin controlled both via settings and filters:

  • Text replacement can be enabled for comments (it isn’t by default)
  • Text replacement can be made case insensitive (it is case sensitive by default)
  • Text replacement can be limited to doing only one replacement per term, per post (by default, all occurrences of a term are replaced)
  • Text replacement can be handled early or late in WordPress’s text filtering process (it’s early by default)
  • Text replacement can be expanded to affect other filters

A few things to keep these things in mind:

  • Your best bet with defining shortcuts is to define something that would never otherwise appear in your text. For instance, bookend the shortcut with colons:

    :wp: => WordPress
    :aol: => America Online, Inc.

Otherwise, you risk proper but undesired replacements:

Hi => Hello 

Would have the effect of changing “His majesty” to “Hellos majesty”.

  • If you intend to use this plugin to handle smilies, you should probably disable WordPress’s default smilie handler on the Writing Settings admin page.

  • This plugin is set to filter ‘the_content’, ‘the_excerpt’, ‘widget_text’, and optionally, ‘get_comment_text’ and ‘get_comment_excerpt’. Filters from popular plugins such as Advanced Custom Fields (ACF) and Elementor are also handled by default (see FAQ for specifics). The “More filters” setting can be used to specify additional filters that should be handled by the plugin. The filter ‘c2c_text_replace_filters’ can also be used to add or modify the list of filters affected.

  • Text inside of HTML tags (such as tag names and attributes) will not be matched. So, for example, you can’t expect the :mycss: shortcut to work in <a href="" style=":mycss:">text</a>

  • SPECIAL CONSIDERATION: Be aware that the shortcut text that you use in your posts will be stored that way in the database. While calls to display the posts will see the filtered, text-replaced version, anything that operates directly on the database will not see the expanded replacement text. So if you only ever referred to “America Online” as “:aol:” (where :aol: => <a href='http://www.aol.com'>America Online</a>), visitors to your site will see the linked, expanded text due to the text replace, but a database search would never turn up a match for “America Online”.

  • However, a benefit of the replacement text not being saved to the database and instead evaluated when the data is being loaded into a web page is that if the replacement text is modified, all pages making use of the shortcut will henceforth use the updated replacement text.

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

Developer Documentation

Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the numerous hooks provided by the plugin. Those hooks are listed below to provide an overview of what’s available.

  • c2c_text_replace_filters : Customize what hooks get text replacement applied to them.
  • c2c_text_replace_third_party_filters : Customize what third-party hooks get text replacement applied to them.
  • c2c_text_replace_filter_priority : Override the default priority for the ‘c2c_text_replace’ filter.
  • c2c_text_replace Customize or override the setting defining all of the text replacement shortcuts and their replacements.
  • c2c_text_replace_comments : Customize or override the setting indicating if text replacement should be enabled in comments.
  • c2c_text_replace_case_sensitive : Customize or override the setting indicating if text replacement should be case sensitive.
  • c2c_text_replace_once : Customize or override the setting indicating if text replacement should be limited to once per term per piece of text being processed regardless of how many times the term appears.

Pricing

Starting from $0 per month.

Check Out the TDEE Calculator Widget

By Common Ninja

TDEE CalculatorTry For Free!

App Info

Rating

Reviewers

18 reviews

Tags

coffee2code
replace
shortcut
substitution
text

Developed By

Scott Reilly

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Maps

Maps plugins for Wordpress

Translation

Translation plugins for Wordpress

Chat

Chat plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Contact

Contact plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Forms

Forms plugins for Wordpress

Comments

Comments plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Comments

Comments plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Video Player

Video Player plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Security

Security plugins for Wordpress

Ads

Ads plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Membership

Membership plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

TDEE Calculator for Wordpress logo

TDEE Calculator

Create custom calculators that let visitors enter values, get results, and make confident choices that support your business.

Feedback Popup for Wordpress logo

Feedback Popup

Collect user insights with a feedback popup that reveals issues early, improves user experience, and captures valuable leads through a clear feedback form.

Airbnb Reviews for Wordpress logo

Airbnb Reviews

Show Airbnb reviews to build trust, improve credibility, and help visitors make confident booking decisions that support higher property sales.

Quotes Carousel for Wordpress logo

Quotes Carousel

Show inspiring quotes with a quotes carousel that rotates messages, enhances design, and keeps visitors engaged.

Image Slider for Wordpress logo

Image Slider

Showcase visuals with an image slider that displays multiple images in a smooth slideshow, improves design, and keeps visitors engaged.

Back to Top Button for Wordpress logo

Back to Top Button

Back to top button that improves navigation, speeds up browsing, and helps visitors move smoothly through long pages for a better user experience.

Tabs for Wordpress logo

Tabs

Use tabs to organize content into clear sections, improve navigation, and help visitors switch between topics quickly for a smoother user experience.

Course Listings for Wordpress logo

Course Listings

Create course listings with a course catalog widget that displays programs clearly, supports easy organization, and helps visitors explore courses effectively.

Website Search for Wordpress logo

Website Search

Add a Google powered search bar that delivers relevant results, improves navigation, and helps visitors find content fast.

Size Chart for Wordpress logo

Size Chart

Add a flexible size chart with visual guides and category tabs to help users choose accurate measurements while shopping.

Interactive Maps for Wordpress logo

Interactive Maps

Create interactive maps with color coding and tooltips to visualize data clearly and embed engaging maps on your site.

All In One Chat for Wordpress logo

All In One Chat

Add a unified chat tool to your site that connects users via WhatsApp, Messenger, Telegram, or email for seamless support.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms