How to add a copyright notice to copied text in WordPress without plugins


add a copyright notice to copied text in WordPress

How to add a copyright notice to copied text in WordPress without plugins

Add a copyright notice to copied text in WordPress and Blogger

Recently I copying the SMS from the Event Blog’s when I am pasting the SMS on My Facebook Status box it showing the Read More notification at the end of Copied Text.I really Love this feature because it helps to Increase our blog traffic, Yes some guys Just copy and share the SMS or any other text to their Friends without Modification the reader view the Read More credit link at the end of text they open that link and view our website 🙂 it will help to increase our website/blog traffic

It also Helps to warn the people who copy the text from your blog/website

  • Helps to Increase your blog/website traffic
  • warn the people who theft the content from your website
  • Supports in all major browser’s
  • works on WordPress, Blogger, Static & dynamic websites

Add a copyright notice to copied text in WordPress without plugins

  • Copy and paste the Below Javascript into your WordPress website header
<script type="text/javascript">
 function addLink() {
 //Get the selected text and append the extra info
 var selection = window.getSelection();
 pagelink = ". Read more at: " + document.location.href;
 copytext = selection + pagelink;
 //Create a new div to hold the prepared text
 newdiv = document.createElement('div');

//hide the newly created container
 newdiv.style.position = 'absolute';
 newdiv.style.left = '-99999px';

//insert the container, fill it with the extended text, and define the new selection
 document.body.appendChild(newdiv);
 newdiv.innerHTML = copytext;
 selection.selectAllChildren(newdiv);

window.setTimeout(function () {
 document.body.removeChild(newdiv);
 }, 100);
 }
 document.addEventListener('copy', addLink);
 </script>
  • Replace Read more at with your Copied text Notice
  • If your WordPress theme having the Insert header and footer script option Means just paste the script on header box or install Insert header and footer plugin.

How to add a Copyright notice to copied text in Blogger Blog?

  • Login to your Bloggers Dashboard
  • Go to template editor and choose Edit HTML
  • use CTRL + F to find </head> tag
  • Copy the above javascript and paste it on above </head> tag
  • Click save settings


Credits

This script was developed by c.bavota (bavotasan.com) Got the Modified script from Stackoverflow.

If you have Any Doubt in this article Please Feel Free to comment here our team will help you.

 



Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com