WordPress

How to disable text selection and copy/paste in WordPress website

Many website owners always face the problem that their content is stolen and used on other websites or social pages. It’s very disturbing to face this type of problem. If you are facing this problem, this article is for you. In this article, I will show you how you can prevent your disabled text selection and Copy/Paste so that no one can steal your content.

Why do you need to disable text selection?

The content got stolen from your website through automated content scraping. Sometimes people also manually copy-paste your content.

So you need to disable the option for those people to make it difficult for them to copy-paste. But remember, heavy users can use inspect tools to view your source code and copy your content from your website. This method will also help you to prevent auto-blogging tools from copying content from RSS. But this process will make it difficult for normal users to fetch content from your website.

You can disable text selection by adding custom CSS to your website or installing a third-party plugin. Here I will show you how to disable text selection using custom CSS.

Preventing Text Selection Using CSS

This method is very simple. You just need to add a simple code to your WordPress theme. First  go to the Appearance >Customize page from the dashboard and open up the theme customizer.

 

In the theme customizer page click on the Additional CSS  option. You will find it on the left sidebar bottom.

After clicking on the additional CSS option, a box will appear and you will need to add the following code to that box.

* {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
   user-select: none; /* Non-prefixed version, currently supported by Chrome, Opera and Firefox */
}


Your code should look like this.

Save this and click on the publish button. You are all done. Now go to your website and try to select any text. It won’t allow you to select the text.

Wrapping Up

Following the process, you will be able to disable text selection and copy/paste into the WordPress website. You can see our other articles to learn How to Create a Frequently Asked Question In WordPress

How to Embed Facebook Feed in WordPress

How to limit authors to edit their own posts in WordPress

We hope this article will help you. If you like this article, please like our Facebook Page to stay connected.

You Might Also Like