Copy Anything to Clipboard is the best WordPress copy to clipboard plugin that adds one-click copy buttons to your website. Perfect for copying code snippets, text, links, coupon codes, deals, contact information, and any content with ease.
This powerful copy to clipboard plugin offers three flexible methods: automatic CSS selector targeting, shortcode integration, and Elementor/Gutenberg widgets. Add copy buttons to code blocks, blockquotes, coupon codes, deals, contact information, and more with just a few clicks.
Key Features:
- NEW: Global Injector - Advanced copy button injection with display conditions
- One-click copy to clipboard functionality
- Automatic copy button for any CSS selector (pre, blockquote, code, etc.)
- Refined shortcode support:
[copy] and [copy_inline] with advanced attributes
- Elementor widgets for 25+ content types
- Gutenberg blocks for modern WordPress sites
- Display conditions - Load assets only on specific pages
- Mobile-friendly and cross-browser compatible
- Lightweight and SEO-friendly
- Customizable button styles (Button, Icon, Cover) and positions
- Copy as HTML or plain text
- Works with all WordPress themes and plugins
Perfect for bloggers, developers, e-commerce stores, educational websites, and anyone who wants to make it easy for users to copy content from their WordPress site. 📋
- Install the
Copy Anything to Clipboard plugin either via the WordPress plugin directory, or by uploading the files to your server at wp-content/plugins.
- Activate the plugin through the 'Plugins' menu in WordPress.
- Go to "Copy to Clipboard" in your WordPress admin menu to start creating copy buttons.
-
Choose your method:
-
Global Injector (Recommended) - Advanced injection with display conditions
- CSS Selector - Automatic copy buttons for all matching elements
- Shortcode - Manual copy buttons with
[copy] or [copy_inline]
- Elementor Widgets - Drag-and-drop copy buttons
- Gutenberg Blocks - Native WordPress block editor support
For detailed setup instructions, visit the
Getting Started Guide.
5.2.0
- New: Copy As (Clipboard Type) - Choose what gets copied per rule: Text only, HTML, Text + HTML (default), Image (Pro), JSON (Pro), SVG (Pro). Global Injector Rule Editor includes "Copy as" section; shortcode and Gutenberg blocks support
copy-as attribute. Uses CTC CopyEngine with Clipboard API; fallbacks for image (HTTPS/CORS) and legacy browsers.
- New: Image format for Copy As Image (Pro) - Choose PNG, JPEG, or WebP when copying as image. Pro adds Image format selector in Copy As section; free plugin provides
ctc.globalInjector.copyAs.after hook for extensibility.
- Improvement: Copy As extensibility - Free plugin now uses
ctc.globalInjector.copyAs.after hook; Pro plugin renders Image format UI (PNG/JPEG/WebP) when Copy As is Image Blob. Follows Rank Math free/Pro pattern.
- Improvement: Pro extension points - Added
ctc/global_injector/rule_enum_fields, ctc/global_injector/rest_rule_data filters; ctc.globalInjector.fieldsToCompare for unsaved-changes detection. Pro adds image_format via extend_meta_mapping, extend_admin_rule_data, extend_frontend_rule_data.
- New: ImageFormatSection (Pro) - Pro component for Image format selection with ButtonGroup and docs link.
- Fix: Image format persistence - Image format selection now persists after save and page refresh (load_rules and REST get_rule_data include image_format when Pro is active).
5.1.0
- New: Main Rule List - Custom rules UI at Settings → Global Injector (
page=ctc-rules): table with Status toggle, Rule Name/Target, Visual Style, Location; row actions Edit, Duplicate, Delete; search and status filter; empty state.
- New: Dashboard (Home) - Copy to Clipboard dashboard at
page=ctc (Settings → Copy to Clipboard).
- New: Shared admin components - AdminHeader, ConfirmModal, Footer, Icons, ProBadge used by Dashboard, Main Rule List, and Rule Editor.
- Improvement: Rule Editor - Header uses shared AdminHeader with back link to Global Rules list.
- Improvement: Legacy CPT redirects - "Add New" and list edit links for
copy-to-clipboard redirect to Global Injector.
- Developer:
get_admin_rules() API for admin list data; Main Rule List and Dashboard use React + Tailwind under .ctc-admin-root.
- Improvement: Global Injector CSS from PHP - Global Injector styles (Button, Icon, Cover) are now output as minified inline CSS from PHP via the new Inline_CSS class. Only the styles and positions used by active rules are included; the
ctc/global_injector/inline_css filter still applies to the final CSS.
- Fix: Cover style fatal error - Added missing
get_global_injector_css() method to the Cover style class so inline CSS builds correctly when Cover style is used (fixes "Call to undefined method Cover::get_global_injector_css()").
- New: Admin bar quick-edit for Global Injector - When viewing a page where Global Injector rules apply, admins see a "CTC" item (with clipboard icon) in the admin bar. Sub-items list "Edit: [Rule name]" for each rule on the page and open the Global Injector settings with that rule selected.
- Improvement: Global Injector URL support - The settings page now supports a
?rule=ID query parameter to open the editor with a specific rule selected (e.g. from the admin bar or bookmarks). Added get_selected_rule_id() helper.
- New: Shortcode
redirect attribute - The [copy] shortcode now supports a redirect attribute for copy-then-redirect flows (e.g. [copy redirect="https://store.com"]CODE10[/copy]). After copying, the user is sent to the given URL. The existing link attribute remains supported for backward compatibility and has the same effect as redirect.
- Fix: Shortcode display text with inner content - When both
text and inner content are present (e.g. [copy text="Hello World"]Copy this[/copy]), the visible label now uses the inner content ("Copy this") and text is used only for the copy payload. Previously the label showed the text value.
- Fix: Native preset CSS when using tag="a" - Using
tag="a" for link-style copy buttons now correctly loads the native preset CSS so theme link styling is applied.
- Fix: Shortcode
link attribute redirect - The "Copy & Redirect" / "Combining Multiple Attributes" flow now works: when link="https://example.com" is set, the shortcode outputs data-ctc-link and the frontend opens the URL in a new tab after a successful copy (e.g. after "Copied! Redirecting...").
- Improvement: Shortcode performance - Inline CSS for the shortcode is now output only for presets actually used on the page (inline, native, button, icon, cover), and the CSS is minified to reduce payload size.
- Improvement: Global Injector rules sidebar - When opening the settings page with a specific rule (e.g.
?rule=318), the selected rule is now scrolled to the top of the rules list within the sidebar only, without scrolling the whole page or moving the admin header out of view.
- Fix: Giant copy icons in tables - Added explicit
width and height attributes (24×24) to all Global Injector SVG icons (Button, Icon, and Cover styles) so theme CSS cannot scale them unexpectedly inside table cells. Thanks @akashathu
5.0.1
Bug fixes and support issues (post-5.0.0) — Thanks to the users who reported these on the
support forum.
- Fix: 404 on ctc.js - Moved script to
assets/frontend/js/lib/ctc.js (renamed from vendor/ to avoid .gitignore conflict). Global Injector and shortcode enqueue the copy engine; fallbacks remain when script is unavailable. Thanks @contemplate
- Fix: Giant copy icons in tables - Copy icons inside table cells no longer scale with table font-size. Added CSS constraints for shortcode and block copy icons when inside
table elements.
- Fix: Square brackets in shortcode content - Legacy shortcodes using
content="... [...] ..." now copy the correct [ and ] characters. The content attribute is decoded from HTML entities before use.
- Fix: Shortcode script loading - Shortcode frontend script no longer depends on the removed vendor script; it loads independently with Clipboard API fallbacks.
5.0.0
🚀 Major Release - Global Injector & Complete Refactor
- New: Global Injector - Advanced copy button injection system with:
- Display conditions to control where copy buttons appear
- Multiple style presets (Button, Icon, Cover)
- Live preview in the editor
- Performance-optimized asset loading
- New: Refined Shortcode System - Enhanced
[copy] and [copy_inline] shortcodes with improved attributes and flexibility.
- New: Style Presets - Pre-built button, icon, and cover styles for quick setup.
- Improvement: WordPress 6.7+ Compatibility - Fixed
_load_textdomain_just_in_time notices with proper plugin initialization timing.
- Improvement: Complete Asset Restructure - Reorganized frontend and admin assets for better performance.
- Improvement: Gutenberg Block Enhancements - Fixed block registration and optimized editor asset loading.
- Improvement: Freemius SDK Integration - Improved SDK initialization with proper hook timing.
- Improvement: Code Quality - Major codebase refactoring with improved naming conventions and standards.
- Fix: Block Editor Assets - Resolved "invalid category" warnings for Gutenberg blocks.
- Fix: Frontend Script Loading - Fixed 404 errors for clipboard scripts after asset restructure.
- Fix: Square Brackets in Shortcode - Fixed HTML entities (
[ ]) not being decoded properly in content attribute. Thanks @akashathu
- Fix: CSS var() Double Dashes - Fixed WordPress converting
-- to en-dash inside CSS var() functions like var(--wp--preset--color--bg). Thanks @mikecargal
- Fix: Legacy Shortcode
content Attribute - Restored proper handling where content attribute contains the text to copy and text attribute is the display text.
- New: Native Anchor Support - Added
tag="a" parameter to use theme's anchor styling instead of custom CTC styling.
- New: Icon Toggle - Added
show-icon="no" parameter to hide the copy icon when not needed.
- Developer: New Architecture - Modular class-based architecture for better extensibility.
4.1.2
- Fixed: iOS 26 compatibility issue by migrating from deprecated
document.execCommand('copy') to modern Clipboard API (navigator.clipboard.writeText()).
- Improvement: Added fallback support for older browsers that don't support the Clipboard API.
- Improvement: Enhanced clipboard functionality across all copy methods (CSS selector, shortcode, Elementor widgets, and Gutenberg blocks).
4.1.1
- Fix: Dependency build failed.
4.1.0
- Improvement: Updated Freemius SDK library with version 2.13.0.
- Improvement: Updated plugin metadata for compatibility with WordPress 6.8.
- Improvement: Enhanced readme content, tags, and FAQ for better search visibility.
4.0.5
- Improvement: Updated Freemius SDK library with version 2.11.0.
- Improvement: Compatibility to WordPress 6.7.2.
4.0.4
- Fixed: Disallow to add script for the contributor level user in the shortcode.
- Improvement: Updated Freemius SDK library with version 2.9.0.
- Improvement: Compatibility to WordPress 6.7.1.
4.0.3
- Hot fix: The dependency not works for post types.
4.0.2
- Fix: The js dependency not works for the shortcode.
4.0.0
- New: Added the Gutenberg block "Term Title".
- New: Added the Gutenberg block "Social Share".
- New: Added the Gutenberg block "Copy Button".
- New: Added the Gutenberg block "Copy Icon".
- Improvement: Updated Freemius SDK library with version 2.7.4.
- Improvement: Compatibility to WordPress 6.6.1.
3.8.3
- Improvement: Updated the recurring cron job registration logic.
3.8.2
- Fixed: Elementor copy button not works due to missing dependency.
3.8.1
- Fixed: The copy animation not works for the shortcode.
- Improvement: Compatibility to WordPress 6.5.3.
3.8.0
- New: Added display conditions for the copy to clipboard to load the assets only on selected pages.
- Improvement: Fixed the copy icon Gutenberg block title issue.
- Improvement: Loading the Gutenberg block assets only on the block used pages.
- Improvement: Added default copied button text.
- Improvement: Compatibility to WordPress 6.5.2.
3.7.0
- New: Added the copy icon Gutenberg block.
3.6.0
- New: Added the target selector support for the copy content in the Elementor widget.
- Improvement: Added to support to copy the markup content from the Copy Icon Elementor widget.
3.5.2
- Improvement: Added the dynamic content support for email, phone, and address Elementor widgets.
- Improvement: Compatibility to WordPress 6.4.3.
3.5.1
- Improvement: Added the background image support for all the Elementor widgets.
- Improvement: Updated Freemius SDK library with version 2.6.2.
3.5.0
- New: Added the "Contact Information" Elementor widget.
- Improvement: Compatibility to WordPress 6.4.2.
3.4.3
- Fix: The shortcode copy the display text instead of the content.
3.4.2
- Improvement: Added the shortcode support for the Elementor widget.
- Improvement: Added the missing table widget in the Elementor category.
3.4.1
- Fix: The button customization is not working in the dashboard screen.
3.4.0
- New: Added table Elementor widget to display content in horizontal, or vertical table and allow to copy the content.
3.3.0
- New: Added button styling support for Elementor widget Copy Icon.
- New: Added button styling support for Elementor widget Copy Button.
- New: Added button styling support for Elementor widget Email Sample.
- New: Added button styling support for Elementor widget Email Address.
- New: Added button styling support for Elementor widget Phone Number.
- New: Added button styling support for Elementor widget Blockquote.
- New: Added button styling support for Elementor widget Code Snippet.
- New: Added button styling support for Elementor widget Message.
- New: Added button styling support for Elementor widget Deal.
- New: Added button styling support for Elementor widget Coupon.
- New: Added button styling support for Elementor widget AI Prompt Generator.
- Improvement: Updated Freemius SDK version 2.6.0.
3.2.1
- Improvement: Improved the Elementor "Coupon Code" widget controls and structure.
- Improvement: Improved the Elementor "Deal" widget controls and structure.
- Improvement: Improved the Elementor "Email Address" widget controls and structure.
- Improvement: Improved the Elementor "Email Sample" widget controls and structure.
- Improvement: Improved the Elementor "Message" widget controls and structure.
- Improvement: Improved the Elementor "Phone Number" widget controls and structure.
- Improvement: Improved the Elementor "Shayari" widget controls and structure.
- Improvement: Improved the Elementor "SMS" widget controls and structure.
- Improvement: Improved the Elementor "Wish" widget controls and structure.
3.2.0
- New: Added the Elementor widget category "Copy Anything to Clipboard".
- Improvement: Compatibility to WordPress 6.4.1.
- Improvement: Improved the Elementor "AI Prompt Generator" widget controls and structure.
- Improvement: Improved the Elementor "Blockquote" widget controls and structure.
- Improvement: Improved the Elementor "Code Snippet" widget controls and structure.
- Improvement: Improved the Elementor "Copy to Clipboard Button" widget controls and structure.
- Improvement: Improved the Elementor "Copy to Clipboard Icon" widget controls and structure.
3.1.0
- New: Added new shortcode [copy_inline] which allow you to copy content from the inline element.
- New: Added Elementor widget Copy Icon.
- New: Added Elementor widget Copy Button.
- New: Added Elementor widget Email Sample.
- New: Added Elementor widget Email Address.
- New: Added Elementor widget Phone Number.
- New: Added Elementor widget Blockquote.
- New: Added Elementor widget Code Snippet.
- New: Added Elementor widget Message.
- New: Added Elementor widget Deal.
- New: Added Elementor widget Coupon.
- New: Added Elementor widget AI Prompt Generator.
3.0.0
- New: Improve the dashboard UI with the new design.
- Improvement: Added the support to edit the existing copy to clipboard post.
- Improvement: Compatibility to WordPress 6.3.2.
- Improvement: Updated Freemius SDK version 2.5.12.
2.6.5
- Improvement: Compatibility to WordPress 6.3.1.
- Improvement: Address a reflected Cross-Site Scripting vulnerability from
icon-color shortcode parameter.
2.6.4
- Improvement: Updated Freemius SDK version 2.5.10 to address a Reflected Cross-Site Scripting vulnerability via fs_request_get.
2.6.3
- Improvement: Added the shortcode attribute
color to set the custom color for the text. E.g. [copy content="Custom Text.." color="#2dcd78"]Copy me![/copy]
- Improvement: Added the shortcode attribute
icon-color to set the custom color for the icon. E.g. [copy content="Custom Text.." style="icon" icon-color="#9437f6"][/copy]
- Improvement: Added the shortcode attribute
style to show the icon. E.g. [copy content="Custom Text.." style="icon"][/copy]
2.6.2
- Improvement: Compatibility to WordPress 6.1.1.
- Improvement: Updated Freemius SDK wit version 2.5.3.
- Improvement: Added the support to copy emojis from the content into the clipboard.
2.6.1
- Improvement: Avoided the button copy to clipboard for Google Docs and Email format.
- Improvement: Avoided the "Copy" text from the clipboard.
2.6.0
- New: Added the Copy Format setting to copy the content for Google Docs or Email.
- Improvement: Added filter
copy_the_code_shortcode_atts for shortcode to redirect the user to another page after copying the content to the clipboard.
- Improvement: Added the support to Trim Lines with filter
copy_the_code_localize_vars.
- Improvement: Added translation support for pt_BR language.
2.5.0
- New: Added a link to easily upgrade to the premium version which was recently not easily visible.
- Improvement: Improve the default button style.
- Improvement: Improve the welcome message by adding the plugin name. Thanks @Andre
2.4.2
- Fix: The message "You are just one step away.." is not disappearing after clicking on button. Thanks @MingHong
2.4.1
- Improvement: Added the sub-menus page links into the post type screen.
- Improvement: Removed the sub-menus Dashboard, Contact Us, Upgrade, and Support Forum.
2.4.0
- New: Integrated the Freemius library for automatic updates, upgrade and for quick support.
- Improvement: Add new dashboard admin page for Copy Anything to Clipboard.
- Improvement: Deprecated the Shortcode admin page which is no longer used.
2.3.5
- Improvement: UI improvements in the shortcode information admin page.
- Improvement: Added the title tag support for the shortcode. So, Whenever the user hovers on shortcode text then it'll see the title.
- Improvement: Avoid the remove spaces support by setting false values to the parameter remove_spaces. Use filter from code snippet https://gist.github.com/7c086cdf0837f5864596945086c603c8
2.3.4
- Improvement: Keep the welcome message only for first time user activate.
2.3.3
- Improvement: Added a welcome message to the user for smooth plugin onboarding.
2.3.2
- Improvement: Improve the code with PHPCS fixes.
2.3.1
- Improvement: Keep the tab spaces while copy to clipboard. Thanks @marius84
- Improvement: Users can now share non-personal usage data to help us test and develop better products.
2.3.0
2.2.2
- Improvement: Getting multiple white spaces in Gutenberg editor.
- Fix: The add new link was wrong which navigate to invalid page.
2.2.1
- Improvement: Move the parent menus as submenu in settings menu.
2.2.0
- New - Added shortcode [copy] to copy the content. E.g. [copy]12345[/copy]. Read more at https://clipboard.agency/doc/
2.1.1
- Improvement - Compatibility to WordPress 5.7.
2.1.0
- New: Added filter
copy_the_code_localize_vars to allow to copy the content as HTMl instead of text.
2.0.0
- Tweak: Create a new post copy to clipboard post depends on the old user settings.
- Deprecated: Removed the filter
copy_the_code_enabled which is no more useful.
- Deprecated: Removed the option
Copy the content which is no more useful. Will add the support though filter if required.
- New: Added custom post type support to add multiple copy to clipboard buttons with different selectors and styles.
- New: Improve the UI with live preview.
- New: Added the new
SVG Icon button style to show the SVG icon instead of button.
- New: Added inside and outside position support for the new style SVG Icon.
- New: Added the new
Cover style to copy the small element in which we could not add the copy button. Such as Emoji and Symbols.
1.8.0
- New: Set the
Copy Content As default option with text.
- Improvements: Converted the
<br> tags into the new line if the option "Copy Content As" selected as Text.
- Improvements: Converted the
<div> tags into the new line if the option "Copy Content As" selected as Text.
- Improvements: Converted the
<p> tags into the new line if the option "Copy Content As" selected as Text.
- Improvements: Converted the
<li> tags into the new line if the option "Copy Content As" selected as Text.
- Improvements: Remove the white spaces and trim the content if the option "Copy Content As" selected as
Text.
- Fix: Copy the content as text works different on Chrome, Firefox and Internet Explorer browsers.
1.7.5
- Fix: The
<br> tag converted into the next line. Select the Text from option Copy Content As. Reported by Konrad.
- Fix: Single level selector copies the selector in the clipboard. Reported by Seb.
1.7.4
- Fix: Nested selectors was not working due to mismatch the copy button position.
1.7.3
- Fix: The
<br> tags was not copied as new line. Reported by @psanger.
1.7.2
- Improvement: Removed unwanted code.
1.7.1
- Improvement: Updated Freemius SDK library with version 2.3.2.
- Improvement: Added the latest new section.
- Fix: The submit button is not visible form the settings page. Reported by Nicolas Tizio
1.7.0
- New: Added General & Style tabs.
1.6.1
- Improvement: Added WordPress 5.4 compatibility.
1.6.0
- New: Added filter
copy_the_code_default_page_settings to change the default page settings.
- New: Added filter
copy_the_code_page_settings to change the page settings.
1.5.0
- New: Added option 'Button Text' to set the default button text. Default 'Copy'.
- New: Added option 'Button Copy Text' to set the button text after click on copy. Default 'Copied!'.
- New: Added option 'Button Title' to set the default button title which appear on hover on button. Default 'Copy to Clipboard'.
- New: Added option 'Button Position' to set the button position. Inside or outside the selector. Default 'inside'.
- Improvement: Added support for Internet Explorer devices. Reported by @rambo3000
1.4.1
- Fix: Added support for IOS devices. Reported by @radiocure1
1.4.0
- New: Added option 'Copy Content As' to copy the content as either HTML or Text.
1.3.1
- Improvement: Updated the strings and compatibility for WordPress 5.0.
1.3.0
- New: Added support, contact links.
1.2.0
- New: Added settings page for customizing the plugin. Added option
selector to set the JS selector. Default its <pre> html tag.
1.1.0
- Fix: Removed
Copy button markup from the copied content from the clipboard.
1.0.0