The exclamation mark ! is used to exclude pages that match the condition they prefix.

For example, to show a widget only on Pages except from a specific Page, the prefix can be used in the conditions as follows:


When used in the Conditions of a widget or sidebar together with the Visibility option Show only on these pages, the widget will be shown on all entries of the built-in post type Page except on the page whose slug is sample-page.

Another example, if you want to show a widget or a sidebar on any Product page but not for products which belong to the Promotions category, you would use the Visibility option Show only on these pages and indicate the following in the Conditions: