If you want to Disable Copy Paste in Blogger and WordPress without plugins then this article is for you in which I will be sharing 3 codes to protect website content by disabling text selection in your website.

It is frustrating when somebody copies your article and ranks for a higher position in SERP. Search engine like Google is trying their best to give more importance to original content rather than copied content.

Note: I have shared 3 (2 CSS & 1 JavaScript) different codes, so if anyone doesn’t work try the other one.

How To Disable Copy Paste In Blogger Website Using CSS? [Method 1]

Step 1: Log in to your Blogger Dashboard > Take a Backup
Step 2: Navigate to Theme > Customize > Advanced > Add CSS > Paste any of the below code > Save

or Paste it just before ]]></b:skin> in by going to Edit HTML

Body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none; 
}

or

P, li, h1, h2, h3, h4, h5, h6  {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none; 
}

That’s all

Instead of using this many lines, you can also use only the last line user-select: none; but each of the code has its own features that work in different browsers. You can read more about User-Select.

How To Disable Copy Paste In Blogger Website Using JavaScript? [Method 2]

Step 1: Log in to your Blogger Dashboard > Take a Backup
Step 2: Navigate to Theme > Edit HTML > Paste Below JavsScript code just before </body> > Save

<script>
$(&#39;body&#39;).bind(&#39;copy cut drag drop&#39;, function (e) { e.preventDefault(); });
</script>

That’s all

Note: A normal guy won’t be able to select if you are blocking selection with this JavaScript code, but it can be selected by disabling JavaScript for that site. So I advise you to use CSS.

How To Disable Copy Paste In WordPress Website Without Plugin By Using CSS?

Step 1: Log in to your WordPress Dashboard
Step 2: Navigate to Appearance > Customize > Additional CSS > Paste any of the below Code > Publish

Body {
  user-select:none;
}

or

P, li, h1, h2, h3, h4, h5, h6 {
  user-select:none;
}

That’s all

How To Enable Selection To Some Parts Of The Website?

These CSS codes will block selection in the whole website, but if you want to enable it for some parts then it can be enabled easily. For example, I want to enable selection for <code> & <pre> so we have to paste this you can change the class according to your need.

code, pre {
-webkit-user-select: text !important;
-moz-user-select: text !important;
-ms-user-select: text !important;
user-select: text !important;
}

For tags like “Code, Pre, blockquote” I recommend you to replace text with all in the above code. Replacing with all will select the whole text available in these tags.

Wrap Up

I’m assuming that this article would be useful for you to disable copy paste on blogger and WordPress without plugins with the help of simple CSS codes. If this article is useful for you then make sure to share it on social media and let me know your feedback in the comment below.

Peace Out!

Similar Posts

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.