What Is the Disable Text Selection feature?
Some sites want to prevent casual copying of their content. The Disable Text Selection feature uses JavaScript to prevent the browser’s default text selection behavior on your site.
This is a soft deterrent, not a security feature. Determined users can still copy the content via the browser’s developer tools or by disabling JavaScript.
Why You Need It
For some types of sites, preventing casual copy is useful:
- Premium content sites: Where the content itself is the product
- Recipe sites: Where the recipes are the unique value
- Course sites: Where the lessons are paid
- Image-heavy sites: Where text captions are a key part of the value
For most sites, this is unnecessary. The content is already protected by copyright, and preventing copy doesn’t add real security.
Trade-offs vs allowing selection
Disabling text selection has trade-offs:
- Accessibility: Users with disabilities who rely on text selection (e.g., for screen readers) are affected
- User experience: Sharing and quoting become harder
- SEO: Search engines can still read the content (they use the HTML, not the visual rendering)
- Real protection: Doesn’t actually protect the content (anyone with dev tools can copy)
For most sites, the trade-offs are not worth it.
How to Disable Text Selection in WordPress
Step 1: Navigate to Settings
Click into the Classic Monks plugin settings in your WordPress dashboard.
Step 2: Go to the Security Tab
Click on the Security menu, then click the Content Protection subtab.
Step 3: Enable Disable Text Selection
Scroll to Disable Text Selection and toggle on. Nested options expand.

Step 4: Configure Sub-Options
The 4 sub-options include:
- Apply to Administrators: Allow admins to still select text (recommended)
- NoScript Overlay: Show an overlay for users with JavaScript disabled
- Allowed Elements: CSS selector for elements where text selection is allowed (e.g.,
.selectablefor a class on elements users can select) - NoScript Message: The message shown in the overlay
Step 5: Save Changes
Click Save Changes.
Step 6: Test
Visit the frontend. Try to select text. The text should not be selectable. To verify the NoScript overlay, disable JavaScript in your browser and reload the page.
Configuration Options
| Option | Description | Default |
|---|---|---|
| Disable Text Selection | Master toggle. | Off |
| Apply to Administrators | Admins can still select text. | On |
| NoScript Overlay | Show overlay for users with JavaScript disabled. | Off |
| Allowed Elements | CSS selector for selectable elements. | (empty) |
| NoScript Message | The message shown in the overlay. | “Please enable JavaScript to access this content.” |
What Gets Affected
- The frontend: text is not selectable (unless on allowed elements)
- The NoScript users: see an overlay (if enabled)
- The admins: can still select text (if “Apply to Administrators” is on)
- The accessibility: may affect users who rely on text selection
What Does NOT Get Affected
- The admin: admins can still select text
- The right-click context menu: not disabled (use a separate feature for that)
- The keyboard shortcuts (CTRL+C, etc.): not blocked (only mouse selection is)
- The screen readers: usually not affected (they use the HTML, not the visual rendering)
- The browser’s developer tools: still allow copying (this is a soft deterrent only)
Advanced Options (Developers)
This feature registers 2 WordPress hooks in disable-text-selection.php:
Actions:
wp_body_opencallscm_disable_text_selection_add_noscript()(Adds noscript fallback)wp_enqueue_scriptscallscm_disable_text_selection_enqueue_assets()(Enqueues text selection disable CSS/JS)
// Hooked in disable-text-selection.php
add_action( 'wp_body_open', 'cm_disable_text_selection_add_noscript' );
The feature modifies WordPress behavior by registering or removing hooks. Disabling it reverses those changes and WordPress returns to its default behavior.