WordPress

How to Disable Text Selection and Copy/Paste in WordPress Website

Many website owners always face this problem that their content is stolen and used in 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 disable text selection and Copy/Paste so that no one can steal your content.

Why do you need to disable text selection?

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 not also help you to prevent auto blogging tools to copy 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 in your website or install 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 in your WordPress theme. At first go to 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 need to add the following code in 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.

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *