CM Search and Replace (CMSR) - Replacement Rules

Replacement Rules

Back to User Guide

Permanent Changes?

By default, the plugin does not make permanent changes to your content.

Once you create replacement rules, they will be applied to visitors only while they access the page.

Learn about saving changes permanently: CM Search and Replace (CMSR) - Saving Changes to the Database

  • Navigate to the Replacement Rules tab on the plugin dashboard. 

  • The first box has a search field to help you navigating around multiple
  • Then a list shows the replacement rules
  • There are options to change:
    • From String / To String - Which string will be searched and then replaced
    • Case - If enabled, the rule will be case sensitive (e.g. will differentiate "a" and "A")
    • Regex - If enabled, the From String and To String fields will be parsed for Regex rules. Learn more: Using Regex
    • Pause - If enabled, the rule will not be applied. Useful for testing
    • Add restrictions / Locations - Learn more below

Adding Restrictions

The plugin allows to restrict each rule in three ways:

1) Timeframe 

  • Click on the box for Add Timeframe
  • A new box appears to set a date and time for the restriction. 
  • Setting the dates means that this rule will be applied only between the date range defined in the restriction. 
  • You can add more than one timeframe

Important: when you set a date and time for the restriction, you need to know that this option works according to the Universal time - and it can be different from the local time that you set in your site settings. To check it, navigate to Admin Dashboard → Settings → General and scroll to the option Timezone.

There are displayed Universal time and Local time.

For example, the case that you see on the screen we have a difference in 3 hours between universal and local time set on the site. So, if we want the replacement rule work from 12 to 13 o'clock according to the local time, we need to set the time in the Add Timeframe option from 9 to 10 o'clock.

2) Restrictions

  • Click on the box for Add Exclusion
  • A new box appears with set of checkboxes
    • Each of the checkboxes allows to exclude given rule from working in associated area eg.
      • Checking "Title" means that, even if the General Settings say otherwise, this rule will not work in titles
  • Setting content type restriction means that this rule will be applied only to the content type defined in the restriction

3) Location

  • Choose between:
    • All - All content will be considered
    • Include - You can define specific posts or pages where the rule will be applied despite the General Settings
    • Exclude - You can define specific posts or pages where the rule will not be applied despite the General Settings
  • Select one or multiple posts or pages

Reorder Rules using Drag and Drop

Rule Order

The plugin works on the rules in the order you set them. This is specially relevant if some of them overlap.

You can reorder them at any time.

Since the order of the rule has a great implications on the output of the content, you can change the order by using a drag and drop interface.

Define Number of Rules Per Page

You can add pagination support or display all rules on one screen using the settings found under the settings tab

Adding More Rules

  • Under options, you can update or delete a restriction rule at any time by clicking the Add Rule button.
  • To save the changes, click on the blue save button in the bottom left hand corner of the tab, before leaving the page.

More information about the On Demand Search and Replace WordPress Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us