No results found. Try again with different words?

Search must be at least 3 characters.

How To Disable Right Click in WordPress

Sidebar Image

Did not find a solution? We are here to help you succeed.

Are you concerned about your website’s content or images being misused? Itโ€™s easy for users to copy, save, or hot-link your images, especially on content-rich sites like photography portfolios.

One effective method to help safeguard your content is to disable the right-click option, preventing unauthorized use of your images.

In this document, we’ll explore why you might want to disable the right-click function in WordPress. Additionally, we’ll walk you through three simple methods to safeguard your valuable content.

When to Consider Disabling Right Click in WordPress

Consider disabling right-click if your WordPress site features unique content, especially images. This action can help prevent content theft and discourage image hotlinking, which strains your server and breaches copyright.

However, be aware that disabling right-click can impact user experience, especially for sites where users frequently copy content, like recipes or DIY guides. Additionally, this method isnโ€™t foolproof; savvy users can bypass it through various techniques.

How To Disable Right Click in WordPress

Now that you know how disabling right-click can protect the content on your website.

Let us look into the three ways you can do this in WordPress.

Use the WP Content Copy Protection & No Right Click Plugin

By using the WP Content Copy Protection & No Right Click plugin, you can prevent right-click actions in WordPress and disable commands like CTRL+C.

This plugin goes a step further by disabling CTRL+U in Chrome, preventing users from viewing your page code, which is another method of content theft.

Moreover, you can extend protection beyond images by disabling the ability to select text. Upgrading to the premium version unlocks additional features, such as watermarking and jQuery overlay protection.

To begin, you’ll need to install and activate the plugin in your WordPress.

Once itโ€™s activated and running on your site, navigate to Copy Protection > Settings. Under Main Settings, you can enable protection on your homepage, posts, and more.

When youโ€™re ready, save your settings. You can then test these changes on the front end.

For instance, you might see a warning message when you try to select or copy an image.

Use the Disable Right Click For WordPress Plugin

With the Disable Right Click For WordPress plugin, you can prevent actions like – Cut, Copy, Paste, View source, Save image, and Inspect element.

First, youโ€™ll need to install and activate the plugin on the WordPress website.

Next, navigate to Settings > Disable Right Click for WP. Then, select the Yes button for Show messages on Disable Events and click on Save Settings.

Use Astra Custom Layouts to Disable Right-Click

If you’re not comfortable with technical tasks, plugins offer simple solutions. However, be aware that they might slightly slow down your site. Alternatively, you can disable the right-click feature by inserting JS code into your footer.php file using Astra Custom Layouts.

Before proceeding, ensure you have the Astra theme and Astra Pro installed and activated on your website.

<script type=โ€text/javascriptโ€>

jQuery(document).ready(function () {

//Disable cut copy paste

jQuery(โ€˜bodyโ€™).bind(โ€˜cut copy pasteโ€™, function (e) {

e.preventDefault();

});

//Disable mouse right click

jQuery(โ€œbodyโ€).on(โ€œcontextmenuโ€,function(e){

return false;

});

});

</script>

Once installed, navigate to Astra > Custom Layouts and select the template to add your JS code to the footer of your website.

With this code in place, users will be unable to right-click on the pages of your website.

It’s straightforward, right? Go ahead and give it a try. Choose the method that fits your website best to disable right-click on your WordPress site.

Was this article helpful?
Sidebar Image

Did not find a solution? We are here to help you succeed.

Related Docs

Join 1,653,898+ Happy Site Owners Using Astra

Whether you are a beginner, small business owner, or professional web developer, Astra provides all the tools you need to easily build your beautiful WordPress website.

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form