HOW TO DISABLE RIGHT CLICK ON WORDPRESS WEBSITE WITHOUT PLUGINS | 2024
Protect website content from copying; by using simple CSS and some codes on the theme’s function you can prevent anyone from copying your text and images. However, please note that this may not be full protection, as people may use several other techniques to copy. For instance, one can simply take a screenshot for both images and text (text can be extracted from images too).
However, these codes will make it difficult for anyone to simply copy the codes by right-clicking on them. Moreover, it will also disable them to inspect elements. The codes are very easy to use and they should work effectively without any issues.
Codes to disable right-click, text highlight, and image save option
This simple code and CSS will help protect your WordPress content as it will disable right-click options. In addition to it, the CSS will also remove the text highlight (disabling Ctrl + C) on the desktop and as well eliminate the image save option. These are very simple to use and will do a great job without using any third-party plugins.
Disable right click Code (Paste to theme functions)
/*Disable right click */
function disable_right_click() {
?>
<script>
jQuery(document).ready(function(){
jQuery(document).bind(“contextmenu”,function(e){
return false;
});
});
</script>
<?php
}
add_action(‘wp_footer’, ‘disable_right_click’);
/*code ends */
disable text highlight CSS Code (Paste to Custom css field)
/*css to disable text highlight will not be able to use ctrl + C */
body {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
}
/*CSS ends */
/*css to remove image load option in mobile */
img {
pointer-events: none;
}
/*CSS ends */
Click Here to Download disable code
View Refences Video Tutorial

Tourism and Its Prospects in Nepal
HOW TO DISABLE RIGHT CLICK ON WORDPRESS WEBSITE WITHOUT PLUGINS
HOW TO DISABLE RIGHT CLICK ON WORDPRESS WEBSITE WITHOUT PLUGINS
HOW TO DISABLE RIGHT CLICK ON WORDPRESS WEBSITE WITHOUT PLUGINS
HOW TO DISABLE RIGHT CLICK ON WORDPRESS WEBSITE WITHOUT PLUGINS