Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressでテキスト選択&コピー&ペーストを防ぐ方法(簡単編)

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

最近、読者から「WordPressでテキストの選択&コピー&ペーストを防ぐにはどうしたらいいですか?

コンテンツの盗用を阻止したい公開者の多くは、これを適用したいと思うかもしれない。これにより、人々があなたのサイトからテキストをコピーすることが少し難しくなります。

この投稿では、WordPressでテキストの選択とコピー&ペーストを簡単に防ぐ方法を紹介します。

Preventing text selection and copying & pasting in WordPress

WordPressサイトでテキスト選択&コピー&ペーストを防ぐ理由とは?

多くのブロガーが、自分のコンテンツが盗用され、権限なしに使用されていることに気づいている。

これは、自動化されたコンテンツのスクレイピングによって起こる可能性があります。また、誰かがあなたのコンテンツの一部またはすべてを手動でコピーした場合にも起こります。

これを難しくする一つの方法は、人々があなたのテキストをコピー&ペーストできないようにすることです。これは、サイト上のテキストを選択しにくくすることで可能です。

技術に精通したユーザーであれば、ソースコードを表示したり、インスペクト・ツールを使って好きなものをコピーすることはできる。また、これらのテクニックは、RSSを使ってコンテンツを取得する自動ブログツールを使用している人々を止めることはできません。

このことを念頭に置いて、WordPressでテキストの選択とコピーを防ぐ方法をいくつか見てみましょう。

方法1:CSSを使用してテキストの選択を防ぐ

この方法はより簡単で、WordPressテーマにカスタマイザーCSSコードを追加するだけです。カスタムCSSを追加したことがない場合は、サイトにカスタムCSSを追加するガイドをご覧ください。

まず、WordPress管理エリアの外観 ” カスタマイズページにアクセスし、テーマカスタマイザーを起動します。

Opening the theme customizer to add custom CSS

テーマカスタマイザーで、左の列から「Additional CSS」タブをクリックする必要があります。

WordPressテーマにカスタムCSSを追加するボックスが表示されます。以下のCSSコードをコピー&ペーストしてください。

* {
  -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 */
}

(コード・ソース)

コードを追加するとこのようになる。

Adding the CSS code to prevent text selection and copy/paste

では、ライブカスタマイザーでページ上のテキストを選択してみてください。選択できないことがわかります。

画面上部の’公開する’ボタンをクリックし、変更を公開することをお忘れなく。

注意:この方法では、現在有効化したテーマのカスタムCSSしか追加できません。テーマを変更した場合、カスタムCSSは保存されません。使用しているWordPressテーマに関係なくコードを保存するには、WPCodeプラグインの使用をお勧めします。

方法2:プラグインを使ってテキスト選択を防ぐ

この方法では、テキスト選択と右クリックを無効化するWordPressプラグインを使用する。これにより、画像がダウンロードされて再利用されるのを防ぐこともできる。

まず、WP Content Copy Protectionプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化した場合、プラグインはそのまま機能します。ユーザーはサイトからテキストをコピー&ペーストすることができなくなります。また、コンテンツの右クリックや印刷もできなくなります。

プラグインの設定を変更したい場合は、簡単にできます。WordPress管理画面の「Copy Protection」ページにアクセスするだけです。

ここでは、特定のタイプのコンテンツに対する保護の有効化または無効化を選択できます。

The settings for the WP Content Copy Protection & No Right Click plugin

変更後は必ず「設定を保存」ボタンをクリックしてください。

また、誰かがコンテンツを印刷しようとしたときに表示されるメッセージを変更することもできます。メッセージは印刷プレビューと印刷物自体にこのように表示されます。

The default message that users will see if they try to print a protected page/post

WordPressでテキストを選択できないようにするのは良いアイデアか?

多くの新規サイトオーナーは、サイトからのコンテンツのコピー&ペーストを阻止したいと考えているが、これらのテクニックはコンテンツの盗用を本当に防ぐものではない。

少し技術に詳しいユーザーなら誰でも、あなたのサイトのコードソースを簡単に開いて、好きなコンテンツをコピーすることができる。

また、あなたの文章をコピーするすべての人がコンテンツ泥棒になるわけではありません。例えば、投稿をソーシャルメディアでシェアするためにタイトルをコピーする人もいるかもしれない。

そのため、テキストを選択できないようにすることはベストプラクティスではありません。この方法は、サイトにとって本当に必要だと思われる場合にのみ使用することをお勧めします。

ほとんどの場合、コンテンツの盗用を防ぐ別の方法を探した方がいい。もしあるサイトがあなたのコンテンツを権限なしに再公開しているのであれば、そのサイトをホスティングサービスしている人物を突き止め、DMCAテイクダウン通知を送ればいい。

WordPressでテキストの選択とコピー&ペーストを防ぐ方法について、この投稿がお役に立てれば幸いです。また、保護されたコンテンツで会員制サイトを作成する方法や、購読者限定コンテンツに最適なメールマーケティングサービスの比較もご覧ください。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

20件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    This is a great guide on how to protect your content against basic copying. I have selected CSS for my site and it seems to work great. Great and thank you. I will be applying to multiple sites.

  3. Sri Praneeth P says

    Thank you for this article. May I know if the CSS code prevents right-click only on the live website or also in the admin area?

  4. Linda says

    Thank you, this was very helpful as I’ve tried some of the plugins to stop it, but when affiliates wanted to copy their links, they could not. So I used the CSS code and that helped, thank you very much. The affiliates can copy their code but people can’t copy my content.
    Do you have an article or CSS code to stop people from copying images as well?
    Thanks again, super helpful article.

    • WPBeginner Support says

      As a tutorial site that gives codes that users can copy, it wouldn’t be helpful to our visitors if we added that code :)

      管理者

    • WPBeginner Support says

      We do not have a specific recommendation at the moment for finding sites copying your content but we will look into the possibility of an article in the future.

      管理者

  5. Matt says

    Option #1 can easily be overridden by looking at the HTML source of the page and copying the text that way.

    • WPBeginner Support says

      Given enough work, there are different workarounds for the ways to prevent text from being copied as the goal of a website is to share information but this is one way to help make that process more difficult.

      管理者

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。