Code Click-to-Copy

For you WordPress users who occasionally need to post lines of source code—or even just URLs, specially those longer more complex ones, such as affiliate links—for your readers to copy and use, the free Code Click-to-Copy plugin makes life a whole lot easier for both you and them.

After doing its easy no-brainer installation typical of many plugins found in the WordPress plugin repository, there’s nothing much else to do with Code Click-to-Copy except activate it. It doesn’t even have any settings to fiddle with.

When activated, it dynamically seeks out text in a webpage’s HTML  that are enclosed in <code> or <pre> tags. When it spots any, it’ll assume it’s code you want readers to copy, and turns it into a live link that lets users copy all of the enclosed text to the clipboard for use. No hassles with highlighting or searching for a copy button either; when the user hovers anywhere over the block of code, a small popup label appears that says, “Click to Copy.” Click, and that whole block of enclosed code or text is automatically copied to the clipboard for use. Easy and convenient!

Here, see it in action for yourself. Let’s try it with a long, convoluted Amazon link, one made even longer by having my affiliate  code embedded in there somewhere. This one leads to the Amazon section that shows us all the various Kindle Reader models available. For demonstration purposes, I chose the long, full link instead of the shortened one that leads to the same destination. You can see it below in all its glory, after I enclosed it in <code> tags. I also purposely did not make it an active link that’ll take you over to Amazon.

Go ahead and hover over it. Then click. It’ll be in your clipboard now. Open a new tab, paste it into the address bar and go! It’ll take you right to the Kindles. Cool, huh?

https://www.amazon.com/gp/browse.html?node=6669702011&linkCode=ll2&tag=wordpreneur-20&linkId=5d326cb6d0a0c0e5697319a41d704ea8&language=en_US&ref_=as_li_ss_tl

 

Share the love