/

CM Search and Replace (CMSR) - Replacement Rules


Replacement Rules

Back to User Guide

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.

  • 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

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

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