How To Add Read More Link to Copied Text in WordPress

How To Add Read More Link to Copied Text in WordPress

Add Read More Link to Copied Text in WP


It basically shows the copyright warning, which is the copyright of the author.  But many do not know How To Add Read More Link to Copied Text in WordPress with javascript or plugin. Wp best plugin ever.

{tocify} $title={Table of Contents}

Many of us have noticed that some bloggers do not allow copying of posts or site content from their blogs on the website or even if the post text can be copied, the copy of Read more or copy of the post is copied with copyright.  Because, when you select an article or content from a blog site and try to copy that content, the copyrighted link is copied.


Why use Read More Link to Copied Text With Copyright link 

 Some people use it to save information for the future of the site and easily share it with everyone. It helps to find out where the text was copied from.

To copy, it is very important to add Read More with post link or copyright link to the site, because anyone can copy your text, even with the post link.  This will make it easier for visitors to find your website.


Adding links to copied text enables the plugin to add a link when copying text on a web page, whenever a user copies content or text from your website.  Alternatively, with this plugin you can prevent visitors from copying your content or replace the copied text with custom text, very easily.

Today I will discuss how to Add Link to Copied Text with copyright / How To Add Read More Link to Copied Text in WordPress with javascript. It can be done in a few steps, You can use plugin for Add Link to Copy Text or javascript.  Which is very easy to use, the details are given below.


Add Read More Link For Copied Text With WP Plugin

Add Link to Copied Text Plugin for Wordpress is very easy.  Here's how to add it to the Wordpress Website:

  • Go To WP Dashboard 
  • Click Plugin
  • Now, Click Add New Plugin
  • Here You can see a Search Box, Then type in the box " Add Link to Copied Text" and search.
  • Now install the plugin and Activate the plugin. 
  • Now Go to ‘Plugin Settings’ then ‘Add Link’ menu under your Dashboard.
  • Then, You can Customize setting as per your requirement and you’re ready for use Read more with post link. 


If can Add this plugin in your cpanel ( /wp-content/plugins) then, You  need to download this plugin from Here. 


How To Add Copyright link to Copied Text in WordPress With Javascript

This is the best javascript for Add link to copied text for wp site.

  • Go To WP Dashboard 
  • Click Appearance » Themes » Editor
  • Then, Paste The blew code in your themes functions.php 
Code : 
function add_copyright_text() {
    if (is_single()) { ?>
 
<script type='text/javascript'>
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 = "<br /><br /> Read more at Blogbn: <?php the_title(); ?> <a href='<?php echo wp_get_shortlink(get_the_ID()); ?>'><?php echo wp_get_shortlink(get_the_ID()); ?></a>"; //Change this if you like
    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
}
}
 
add_action( 'wp_head', 'add_copyright_text');

Add Read More Link to Copied Text in WP
functions.php

  • Now Save it. And Enjoy. 


Conclusion : If you read this full post, You can do apoly on your wp site - Add Read More Link to Copied Text in WordPress / Add Link to Copied Text Plugin. If you had problem Adding these plugin or javascript code. Please comment blew or Contact with us.

Post a Comment

Previous Post Next Post