{"id":21534,"date":"2021-03-15T15:00:17","date_gmt":"2021-03-15T14:00:17","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=21534"},"modified":"2021-03-12T16:19:55","modified_gmt":"2021-03-12T15:19:55","slug":"disable-text-selection-in-wordpress","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/disable-text-selection-in-wordpress\/","title":{"rendered":"How to Disable Text Selection and Copy\/Paste on Your WordPress Website"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]It takes a great deal of time and effort to create content, and hosting content online isn\u2018t free. Small wonder, then, that many <strong>content creators and other copyright owners take steps to protect their content<\/strong> from being stolen and reused elsewhere, or misrepresented as somebody else\u2019s. While there are no ways of completely protecting all your content, there are ways <strong>you could make it more difficult for your visitors to copy your content<\/strong>. One of the things you could be looking into is <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-disable-right-click-wordpress\/\">disabling right click on your WordPress website<\/a>. Another, which we shall be discussing now, is disabling text selection and the copy\/paste command.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Disabling text selection will not completely stop a determined and tech-savvy user who knows <a href=\"https:\/\/qodeinteractive.com\/magazine\/browser-inspect-element-tool-in-wordpress\/\">how to use the inspect tool<\/a> to their advantage, but it will give them an extra hoop to jump through if they want to copy your content. It will also not stop a dogged user determined to type out your text manually.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Should you disable text selection, though? We will show you how to disable text selection and copy\/pasting on your website, but let us first talk about the whys and wherefores of the issue.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Here\u2018s what we will be discussing:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#why-disable-text-selection\">Why You Should Disable Text Selection on Your WordPress Website<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#why-not-disable-text-selection\">Why You Should Not Disable Text Selection on Your WordPress Website<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#disable-text-selection-using-css\">How to Disable Text Selection Using CSS<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#disable-text-selection-using-plugin\">How to Disable Text Selection Using a Plugin<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"why-disable-text-selection\"><\/a>Why You Should Disable Text Selection on Your WordPress Website<\/h2>\n<p>[\/vc_column_text][vc_column_text]In order to copy text, you typically have to select it. So, obviously, if you want to prevent your visitors from copying your textual content, you should disable text selection. This way, you make it more <strong>difficult for them to claim authorship of your text or otherwise use it without permission<\/strong>. They could still type all your text out manually, but that\u2018s a sight more difficult and more time consuming than copying and pasting and changing the author name and byline.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Copy protection may simply be the case of you protecting your otherwise readily available posts from being misrepresented as somebody else&#8217;s, but what if you are charging people to access your articles? You\u2018ll want to <strong>prevent one paying user from bypassing the paywall<\/strong> and making your content available to everyone, thus denying you the income.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]It may not even be your text to begin with: <strong>you could be hosting other people\u2018s content under exclusive license<\/strong>. If that is the case, you have double the reason to protect your hosted content from being copied: not only could you end up being denied your rightful earnings, you could be liable for damages. It behooves you to protect the content other people have made available to you and protect them from being stolen from.[\/vc_column_text][vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"why-not-disable-text-selection\"><\/a>Why You Should Not Disable Text Selection on Your WordPress Website<\/h2>\n<p>[\/vc_column_text][vc_column_text]Conversely, if your original content is <strong>made to be freely distributed<\/strong>, you really shouldn\u2018t disable text selection. If you have meant to share your content all along, then it makes no sense to deny your visitors the possibility of copying and saving it for later reading at leisure.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Some users may even prefer to print out your content or organize it differently. If you are running a DIY blog, maybe your content has a place printed out and pinned on the wall of a visitor\u2018s workshop for easy reference. If you are running a cooking blog, maybe some of your users want to copy and paste your recipes into their own recipe books, whether paper or digital. The same goes for guitar tabs and sheet music \u2013 it\u2019s hard enough playing an instrument, you don\u2019t need to be handling an electronic device, too.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]You could also be hosting <strong>public domain content<\/strong>, be it content for which copyright had expired, such as old literary texts, or content which is meant to be freely accessible without limitations, such as legal statutes. In that case, it makes no sense to restrict copying at all.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]So, with that in mind, if you are still looking to disable text selection, scroll right down to our demonstration.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"disable-text-selection-using-css\"><\/a>How to Disable Text Selection Using CSS<\/h2>\n<p>[\/vc_column_text][vc_column_text]You can disable content selection by adding some additional CSS to your theme\u2018s code. In order to do that, you need to access your theme customizer. You can navigate to it from the left-hand side of your WordPress menu, by clicking <strong>Appearance&gt;Customize<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/02\/Appearance-Customize.jpg\" class=\"attachment-full size-full\" alt=\"Appearance Customize\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/02\/Appearance-Customize.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/02\/Appearance-Customize-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/02\/Appearance-Customize-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/02\/Appearance-Customize-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Next, you need to click on the appropriate section of the left-hand side to add <strong>Additional CSS<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Customize-Additional-CSS.jpg\" class=\"attachment-full size-full\" alt=\"Customize Additional CSS\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Customize-Additional-CSS.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Customize-Additional-CSS-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Customize-Additional-CSS-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Customize-Additional-CSS-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Finally, you need to add some code to your theme in order to prevent your visitors from selecting text on your website. Simply copy and paste the following lines:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">*{\r\n-moz-user-select: none; \r\n-ms-user-select: none; \r\n-khtml-user-select: none; \r\n-webkit-user-select: none; \r\n-webkit-touch-callout: none; \r\nuser-select: none; \r\n}<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"666\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Additional-CSS-Added-1.jpg\" class=\"attachment-full size-full\" alt=\"Additional CSS Added\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Additional-CSS-Added-1.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Additional-CSS-Added-1-300x206.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Additional-CSS-Added-1-768x528.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Additional-CSS-Added-1-620x426.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, you need to click <strong>Publish<\/strong> to save your changes. Now, if you try to select text on your website, you will find that you are unable to do so. And if they can\u2018t select your text, your visitors will not be able to copy it easily.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\"><a id=\"disable-text-selection-using-plugin\"><\/a>How to Disable Text Selection Using a Plugin<\/h2>\n<p>[\/vc_column_text][vc_column_text]But maybe you do not feel confident changing your website\u2018s code. That\u2018s fine, there is another solution: you can use a plugin to disable text selection. Our preferred plugin, which we will be using today, is the <a href=\"https:\/\/wordpress.org\/plugins\/wp-content-copy-protector\/\" target=\"_blank\" rel=\"noopener\">WP Content Copy Protection &amp; No Right Click<\/a>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Having installed the plugin, you need to visit the plugin\u2018s settings in order to configure it. You will find the <em>WP Content Copy Protection (Free)<\/em> link in the newly created <strong>CP Plugins<\/strong> section of your WordPress dashboard left-hand side menu.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/CP-Plugins.jpg\" class=\"attachment-full size-full\" alt=\"CP Plugins\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/CP-Plugins.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/CP-Plugins-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/CP-Plugins-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/CP-Plugins-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]In the free version of this plugin, you will only get the basic protection, but even the free version will nonetheless prevent your visitors from selecting your text. To enable selection protection, we will leave all the drop-down menus on their default setting, <strong>Enabled<\/strong>, for single posts (meaning individual posts), the homepage, and the static page.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]You can change the plugin icon from <strong>Visible<\/strong> to <strong>Hidden<\/strong>, or leave it as is, as we have. It only provides a shortcut to the plugin\u2018s settings for the admins, visible in the top bar.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]You can also see that logged-in admins can be excluded from this type of content protection in the <a href=\"http:\/\/www.wp-buy.com\/product\/wp-content-copy-protection-pro\/?src=title\" target=\"_blank\" rel=\"noopener\">premium version<\/a> of the plugin.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Finally, we can customize the selection messages the user sees when they try to select or print out our content. For the selection message, we have gone with <em>Sorry, this content is protected<\/em>. This is the message each of your visitors will see when they attempt to select text on your page. For the print preview message, we have gone with <em>You are not allowed to print preview this page<\/em>. You, of course, can customize these messages to fit the writing style of your website better. Once you are satisfied, click <strong>Save Settings<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"605\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Plugin-Settings-1.jpg\" class=\"attachment-full size-full\" alt=\"Plugin Settings\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Plugin-Settings-1.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Plugin-Settings-1-300x187.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Plugin-Settings-1-768x480.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Plugin-Settings-1-620x387.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]And now, if any of your visitors attempts to select text which is on your website, they will receive a warning message.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"516\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Warning-Message.jpg\" class=\"attachment-full size-full\" alt=\"Warning Message\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Warning-Message.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Warning-Message-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Warning-Message-768x409.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/03\/Warning-Message-620x330.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]They will not be able to select any of the content on your page, including text, which will preclude them from copying and pasting it, too.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">In Conclusion<\/h2>\n<p>[\/vc_column_text][vc_column_text]As we have shown, there are two easy and free ways to protect your content from being copied, and both of these work for both mouse drag selection and keyboard shortcuts (<em>Ctrl+A<\/em>, <em>Ctrl+C<\/em>, and so on). Neither of them constitutes complete protection, though \u2013 nobody can stop a person from manually copying your text, after all \u2013 but they do make it a little more difficult. If a user is not specifically intent on stealing your content, a warning message may be enough to dissuade them.[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Looking to protect your textual content from copying? Try disabling text selection on your website. We will show you how.<\/p>\n","protected":false},"author":16990,"featured_media":21656,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[20,47,4,13],"class_list":["post-21534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-css","tag-plugin","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/21534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/16990"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=21534"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/21534\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/21656"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=21534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=21534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=21534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}