Best Way to Add a Read More Link to Copied Text in WordPress

Are you looking for a way to prevent your content from being copied? Do you want to control how the content is copied?

Every day a considerable amount of content gets stolen from websites. It is challenging to prevent users from copying your website content.

People can use your content and get views and the credit you deserve without your permission.Β 

There is a way to limit the number of characters people can copy, and you can also add a read more link at the end of the copied text.Β 

In this post, you know why you need to add read-more links to the copied text and how to limit the number of characters on the copied text.

Why Should You Add Read More Link to Copied Text?

Even if you disable the right-click and copy hotkeys and prevent text selection (CTRL + C and CMD + C), some experts might find a way to copy your content.

But there is a method that allows you to limit the number of characters people can copy from your website and add a link to your website and your posts on the copied content.

This method is hack-proof, and no one can do any trick to disable it (if you do it correctly), and you can ensure your content is entirely safe since they can’t copy the whole post and only part of it.Β 

Even you can allow users to copy your content but append your credit at the end of copied text to get backlinks from copier websites. So, search engines like Google give your website and used keywords a better ranking and higher authority when other websites give you a backlink.Β 

Adding a read more link is a great way to get something out of the stolen content since you get the credit for your work and a backlink to your website.

With a link to your website, the website’s user will know the content’s reference and visit your website if interested in your content.Β 

How To Add a Read More Link to Copied Text [2 Methods]

Adding a read more link is the final step to ensure your content is safe from thieves, and even if they find a way to copy your content, you get something out of it.Β 

You can use a plugin or custom code to add a read-more link to the copied text. I will explain how to append a custom text in the copied text with the WPShield Content Protector plugin.

Because this is important for your site, I recommend you use a content protector plugin because these plugins are created for this manner and protect your site in multiple ways. Still, simple codes are easy to implement and also easy to hack!Β Β Β 

In the following, I will present two methods to add a custom link to the copied text.Β 

Method 1: Use WPShield Content Protector Text Copppy Limiter

In any website using WordPress, adding a read more link to the copied content can be tricky, but with WPShield Content Protector, it is effortless.Β 

The method that WPShield Content Protector offers is very safe. You can finally ensure your content is secure and you are credited well.Β 

Consider this option since this method works with any browser; No trick can sabotage this method, even disabling JavaScript codes on the browser!

WPShield Content Protector also offers many unique features like limiting the right-click menu, hiding your website’s source code, protecting your content from disabling JavaScript codes, and other 15 protectors that you can use to create a shield around your site content.

Besides adding a read more link, WPShield Content Protector can limit the number of characters that can be copied.Β 

Follow these steps to add a read-more link to the copied text:

Step 1: Download WPShield Content Protector.

Step 2: Install the plugin from Plugins β†’ Add New.

Step 3: Go to WP Shield β†’ Settings.

Go to WP Shield β†’ Settings and Open Settings Panel

Step 4: Go to Text Copy Protector and turn on the Text Copy Protector.Β 

Go to Text Copy Protector and Turn on the Text Copy Protector

Step 5: Choose Allow Copy, But Append Copyright Notice as the Protection Protocol.

Choose Allow Copy, But Append Copyright Notice as the Protection Protocol

Step 6: Enter the text you want to add at the end of the copied text in Copyright Notice for Appending. You can enter placeholders or any text you want to appear.Β 

Enter the text to Add at the end of the Copied Text in Copyright Notice for Appending

If you like to limit the number of characters users can copy, follow these steps:

Step 1: Go to Text Copy Protector and turn it on the Text Copy Protector.Β 

Step 2: Choose Allow Copy, But Append Copyright Notice as the Protection Protocol.

Step 3: Enter the number of characters users can copy from your website in Maximum Length of Copied Text in Copyright Notice Appender.Β 

Enter a number in the Maximum Length of Copied Text in the Copyright Notice Appender

For example, if you enter 100 in Maximum Length of Copied Text, only the first 100 characters get copied.Β 

This method is the safest way to append a custom text at the end of the copied text.Β 

Method 2: Use Custom Code Manually

If you use WordPress, adding read more code is a viable option to add credit to the copied content. However, there are better ways than using code to manually append a text at the end of the copied text.

Important Note: Since this method works with JavaScript, users can disable JavaScript code on their browsers to work around this method.Β I suggest you use the WPShield Content Protector plugin because it works even if the visitor disables the JavaScript in the browser!

To add a read-more link to the copied text with custom code without plugin, follow these steps:

Step 1: Go to Appearance β†’ Theme File Editor.

Go to Appearance β†’ Theme File Editor in WordPress Dashboard

Step 2: Find the functions.php file from the Theme Files list.Β 

Find the functions.php File from the Theme Files List

Step 3: Add the following code at the end of the file.Β 

function betterstudio_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 BetterStudio: <?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', 'betterstudio_add_copyright_text');

Add the Custom Code at the End of the Codes

Now, if someone tries to copy your content, a read more link will be appended at the end of the text.Β 

Conclusion

In this article, you learned if you should add a read more link at the end of the copied text, how to append a copyright notice, and how to limit the number of copied characters.

Use WPShield Content Protector to ensure your content is safe, and no trick can disable its protections.Β 

Thank you for reading this article that I enjoyed writing. Let me know in the comments if you have any questions or alternative ways to append the read-more link in the copied text.

Please, stay tuned to our new releases by following BetterStudio’s Twitter and Facebook.Β 

Leave a Reply