How to Add A Read More Link to Copied Text In WordPress And Blogger

Your article or your contents are real asset for you, its desire of every blogger that his asset should safe from thieves, as you know 82% of content shared on the web occurs via copy & paste, recently examine that well reputed websites such as Techcrunch, Huffington Post eHow now have a read more link, basically read more link mean whenever anyone will copy your article words, your website link will also copy automatically, This can be a fine means to find lot visitors to your website as lots of people will copy and paste text from website into a messages or Email, so here I am going to give you tutorial about this, this tutorial is both for blogger user and wordpress  as well.

how to add a read more link to copied text in blogger How to Add A Read More Link to Copied Text In WordPress And Blogger

Learn How To Add Read More Link To Copied Text:

1. Tynt 

Tynt is a website which provides this services, it is hosted website which require to sign up and tyny will create code after it, you need to just insert your Email address, your website address and your password, now you will get JavaScript code which you have to insert just before your blog head section.



It is also available in a WordPress plugin, “Tynt WP Plugin“. Just download and install this plugin, after installation, it will ask you to insert JavaScript, as I mention process above, follow and get JavaScript, now paste in plugin setting box, now your plugin will start working.


2. Javascript

You can also copy and paste the below javascript into the <head> section of your page, copy below code and paste just before you opening tag of head.

Note: Below code can use only for blogger.

<script type="text/javascript">// <![CDATA[
function addLink() {
    if (
window.getSelection().containsNode(
document.getElementsByClassName('entry-content')[0], true)) {
    var body_element = document.getElementsByTagName('body')[0];
    var selection;
    selection = window.getSelection();
    var oldselection = selection
    var url = document.URL
    var pagelink = "
 Read more at Cazue: PAGE TITLE HERE <a href='" + url + "'>" + url + "</a>"; // Change this to suit
    var copy_text = selection + pagelink;
    var new_div = document.createElement('div');
    new_div.style.left='-99999px';
    new_div.style.position='absolute';
    body_element.appendChild(new_div );
    new_div.innerHTML = copy_text ;
    selection.selectAllChildren(new_div );
    window.setTimeout(function() {
        body_element.removeChild(new_div );
    },0);
}
}
document.oncopy = addLink;
// ]]></script>

 

If you are using WordPress then copy below code and paste into functions.php file.

function add_copyright_text() {
if (is_single()) { ?&gt;
<script type="text/javascript">// <![CDATA[
function addLink() {
    if (
window.getSelection().containsNode(
document.getElementsByClassName('entry-content')[0], true)) {
    var body_element = document.getElementsByTagName('body')[0];
    var selection;
    selection = window.getSelection();
    var oldselection = selection
    var pagelink = "
 Read more at Cazue: <?php the_title(); ?> <a href='<?php echo wp_get_shortlink(get_the_ID()); ?>'><?php echo wp_get_shortlink(get_the_ID()); ?></a>"; // Change this to suit
    var copy_text = selection + pagelink;
    var new_div = document.createElement('div');
    new_div.style.left='-99999px';
    new_div.style.position='absolute';
    body_element.appendChild(new_div );
    new_div.innerHTML = copy_text ;
    selection.selectAllChildren(new_div );
    window.setTimeout(function() {
        body_element.removeChild(new_div );
    },0);
}
}
document.oncopy = addLink;
// ]]></script>
<!--?php <br ?--> }
}

 

3. You can also use Read More Copy Link Plugin for wordpress.

Leave a Reply

Your email address will not be published. Required fields are marked *

*