10,000+
August 20, 2026
May 30, 2018
Copy Anything to Clipboard helps visitors copy text, links, coupon codes, commands, email addresses, AI prompts, and code snippets in one click—no awkward text selection on mobile, no broken formatting in the clipboard.
Use it on blogs, docs, WooCommerce and deal sites, SaaS landing pages, tutorials, and support hubs where you want fewer “how do I copy this?” questions and smoother sharing of URLs, promos, and technical steps.
Why site owners install it
Integration options
pre, code, .coupon) plus display conditions and live preview.[copy] (alias: [ctc]) for precise placement in the editor, widgets, and templates.Highlights
You can add copy buttons anywhere on your WordPress site using one of the following methods:
EASY: Shortcodes
Manually add copy controls with [copy] anywhere in your content.
AUTOMATIC: Global Injector
Automatically inject copy buttons into any element using CS selectors like pre, code, blockquote, or any custom selector with advanced display conditions.
Elementor Widgets
Add copy buttons visually using dedicated Elementor widgets.
Gutenberg Blocks
Insert copy buttons directly inside the WordPress block editor using Gutenberg blocks.
Use [copy] anywhere you want an explicit copy control (Classic editor, Shortcode block, widget areas, patterns, or PHP templates via do_shortcode()). [ctc] is the same shortcode with a shorter name—use either.
How it works (matches the plugin code)
preset="button", preset="icon", or preset="cover".text="…" (or text wrapped between [copy] and [/copy]) is what lands on the clipboard.display="…" overrides the visible label when it must differ from the copied string (masked secrets, mailto links, etc.).text="…" + content="…" — content is copied, text is what visitors see (handy for hiding long URLs behind a short CTA).Try it on a fresh install — add a Shortcode block (or switch the block editor to Code editor), paste one snippet, Update, view the page, and tap the control.
Next live workshop: [copy]2030-03-19 10:00 America/New_York[/copy] — copy the full value for your calendar tool.
Billing questions? Email [copy]invoices@clipboard.agency[/copy] and include your order ID.
[copy display="support@clipboard.agency"]mailto:support@clipboard.agency?subject=Question%20from%20website[/copy]
Visitors see support@clipboard.agency; the clipboard receives the full mailto: string with the subject line.
Before you open a ticket, include: - Order ID: [copy]WC-104592-UK[/copy] - Line item SKU: [copy]BM-HOODIE-M-NVY[/copy] - Return auth: [copy]REF-88C0A921[/copy]
Launch week only — use [copy]SPRINGLAUNCH26[/copy] at checkout for 25% off your first year.
[copy text="https://www.amazon.com/dp/B0D1EXAMPLE/ref=nosim?tag=clipboard0d-20"]Copy our Amazon pick[/copy]
The visitor reads Copy our Amazon pick; the clipboard gets the full tagged URL.
Track this shipment: [copy]1Z999AA10123456784[/copy]
Run this once: [copy]npx create-next-app@latest my-shop --typescript --eslint --tailwind --app[/copy]
Safe cache flush: [copy]wp cache flush && wp rewrite flush[/copy]
Production key (rotate after testing): [copy text="sk_live_51QxYzAbCdEfGhIjKlMnOpQrStUvWx0123456789" display="sk_live_…6789"]
Visitors only see the shortened mask; the full secret is still copied once for trusted teammates.
SSID: [copy]Guest-Office-5G[/copy] · Passphrase: [copy text="WinterLake#2026!" display="••••••••••••"]
Join the stand-up: [copy]https://teams.microsoft.com/l/meetup-join/19%3ameeting_EXAMPLE%40thread.v2/0?context=%7b%22Tid%22%3a%22...%7d[/copy]
Share photos with [copy]#ClipboardAgencyLive2026[/copy] — we monitor that tag all week.
[copy preset="button" button-text="Copy Docker install" text="curl -fsSL https://get.docker.com | sh"]
Docker CE (Ubuntu): [copy text="sudo apt-get install docker-ce docker-ce-cli containerd.io" preset="icon" tooltip="Copy apt install line"]
[copy preset="button" text="SAVE20" button-text="Copy code & checkout" redirect="https://clipboard.agency/checkout/?coupon=SAVE20"]
[copy preset="cover" text="body { margin: 0; font-family: system-ui, sans-serif; }" button-text="Copy CSS"]body { margin: 0; … }[/copy]
The visible card shows the shortened preview; the overlay copies the full CSS string.
[copy text="Open the parking map" content="https://maps.app.goo.gl/dQw4w9WgXcQ"]
SEPA reference: [copy]RF18539007547034[/copy]
Paste this body: [copy]{ "event": "signup", "plan": "pro", "trial_days": 14 }[/copy]
The Global Injector is the most powerful way to automatically add copy buttons anywhere on your website.
It allows you to target elements using CSS selectors and control exactly where the copy buttons appear.
Key Capabilities
pre, code, blockquote, and more.pre, code, or blockquote).This is the quickest and most commonly used method. It automatically adds copy buttons to all elements that match a specific CSS selector.
Use this method when you want copy buttons to appear automatically across your entire website without manually adding them to each element.
Example 1 – Code Snippets
If your posts contain code snippets inside the <pre> tag, simply set the selector to pre (without the angle brackets < and >).
The plugin will automatically add a copy button to every <pre> element, allowing visitors to copy code snippets with one click.
Example 2 – Blockquotes
If you want users to copy quotes from your blog posts, set the selector to blockquote (without the angle brackets < and >).
A copy button will automatically appear for all blockquote elements on your site.
You can target any HTML element or custom class using CSS selectors such as:
pre – If your posts contain code snippets inside the <pre> tag.code – If your posts contain code snippets inside the <code> tag.blockquote – If you want users to copy quotes from your blog posts..coupon-code – If your posts contain coupon codes..email-address – If your posts contain email addresses..copy-this – If you want to copy specific content.pre or blockquote).For more detailed guides:
The plugin includes multiple Elementor widgets that allow you to easily add copy buttons to specific content on your page.
Simply drag and drop a widget and configure the content you want visitors to copy.
These widgets are useful for many types of content including:
You can explore live examples for all widgets here:
For full examples and widget demos:
[copy] / [ctc] for surgical placement in the classic editor, widgets, and templates.PRO adds advanced customization and analytics. Compare plans:
https://clipboard.agency/pricing/
10,000+ active installs rely on Copy Anything to Clipboard for docs, deals, dev blogs, and support content. It is built to cooperate with popular themes and page builders (including Elementor) instead of fighting your layout.
Ideas and edge cases help the roadmap. Share yours:
https://clipboard.agency/contact/
Installation, Elementor, Gutenberg, performance, and HTML vs plain text are covered in the FAQ tab on this plugin page.
We also provide a Google Chrome Extension that allows users to quickly copy content from any website.
The extension works perfectly alongside the Copy Anything to Clipboard WordPress plugin, making it easy to copy text, links, commands, code snippets, and more across the web.
If the plugin saves you time, you can support ongoing development here:
This plugin provides 4 blocks for the WordPress block editor:
Add a small icon that lets users quickly copy text or code to the clipboard.
Add a visible button that allows users to copy content with one click.
Display the title of the current taxonomy term such as category or tag.
Allow visitors to quickly share content across social media platforms.
You can go from zero to working copy buttons in a few minutes—install the plugin, activate it, then add either a Global Injector rule or a shortcode on a test page.
wp-content/plugins
Activate the plugin through the Plugins menu in WordPress.
Go to WordPress Admin Copy to Clipboard.
Choose one of the following methods to add copy buttons:
Global Injector (Recommended)
Automatically inject copy buttons using CSS selectors and display conditions.
CSS Selector
Automatically add copy buttons to elements like pre, code, or blockquote.
Shortcodes
Manually add copy controls using [copy] or [ctc].
Elementor Widgets
Drag-and-drop widgets for Elementor page builder.
Gutenberg Blocks
Use native WordPress blocks for copy buttons and icons.
For full setup instructions, read the documentation:
https://clipboard.agency/doc/
The Global Injector (from v5.0.0) adds copy controls wherever matching elements appear. You define a CSS selector (for example pre, code, or .promo-code), pick a Button, Icon, or Cover preset, optionally set display conditions, and preview before saving. Open WordPress Dashboard Copy to Clipboard Global Injector.
Create a Global Injector rule or a classic CSS selector entry with selector pre or code, choose a style, save, and matching code blocks get a copy control (subject to your display conditions).
Yes. Use display conditions in Global Injector, or use shortcodes only where you need them ([copy] or [ctc]).
Yes. With Elementor active, edit a page, search the panel for Copy, and use the dedicated widgets (copy button, code snippet, coupon, prompts, and more).
Yes. Insert the bundled blocks (for example Copy Button and Copy Icon) from the block inserter.
Yes—styles, colors, placement, and labels are configurable in the admin. Global Injector includes a live preview. Deeper styling and analytics are part of PRO.
Use display conditions in Global Injector to limit rules by post type, taxonomy, individual content, user role, and more so design and asset loading stay intentional.
Yes. Copy actions are built for phones and tablets as well as desktop.
Yes. Current versions of Chrome, Firefox, Safari, and Edge are supported.
It is built to stay lightweight. Combine display conditions with how you scope rules so scripts and styles load where copy UI is actually used.
Yes. The legacy content attribute is what gets copied. Inner shortcode text is the visible label. Example: [copy content="/path/to/file"]Install path[/copy] copies /path/to/file and shows Install path.
Yes. Depending on settings and shortcode attributes, content can be copied as plain text or HTML, which helps with code snippets and formatted excerpts.
Guides: https://clipboard.agency/doc/ — Contact: https://clipboard.agency/contact/
content vs inner label – FAQ now documents that content is the clipboard payload and inner shortcode text is the visible label (for example [copy content="/path/to/file"]Install path[/copy]).signals.surror.workers.dev.content attribute and inner markup – When the legacy content attribute sets the clipboard payload and the shortcode also wraps inner content (for example [copy content="/path/to/file"]Install path[/copy]), the visible label now uses the inner content for display while text remains what gets copied. Previously the label could fall back to the same value as content and ignore the wrapped text.pre and code blocks (including themes using Highlight.js, such as the setup on zanglikun.com) now preserve indentation and whitespace when copying, so Java / PHP / shell snippets paste exactly as shown instead of being flattened into a single left-aligned block. Thanks to Likun Zang for reporting the issue.[copy] inside table plugins (Data Tables Generator by Supsystic, wpDataTables) now works correctly. Scripts and styles load when the table shortcode is on the page, and copy controls work with cached or dynamically rendered table content. Thanks to @jayceezay for reporting. See: https://wordpress.org/support/topic/copy-shortcode-in-table-cells-not-working-anymore/ctc-wrapper markup) are now reliably detected and bound by the frontend script, so clicking the button correctly copies the content even when the HTML is pre-rendered or cached.[copy] shortcodes now use document-level event delegation, so buttons added dynamically (e.g. by table plugins after page load) remain clickable.pre / code elements now integrate more safely with external highlighters and pre-rendered content, ensuring the “Copy Anything to Clipboard” behavior stays consistent without breaking existing theme or page builder output.source = 'gutenberg-block' in the same analytics table. Pro Analytics dashboard shows a three-way source breakdown (Global Injector, Shortcodes, Gutenberg Blocks) and a Block by page view so you can see which pages drive the most Gutenberg block copy events.data-ctc-analytics and data-ctc-source="gutenberg-block"; frontend sends analytics to POST /ctc/v1/analytics/events after each copy (non-blocking). Block scripts and styles still load only when the relevant block is present on the page.has_block( 'copy-the-code/icon' ). This avoids loading assets on every page and improves performance when the block is not used.source = 'shortcode' with post and page context, alongside Global Injector events. You can disable tracking for specific shortcodes via an analytics attribute (for example, [copy analytics="off"]Code[/copy] still copies but does not record analytics for that instance)./ N prev whenever previous-period data exists (including 0), reserving -- prev only for truly missing data, and uses clearer trend labels for trending vs lagging periods.CTC_VER constant, core class, composer, and readme. Release tooling (npm run version:check / version:set) now fails on mismatches and keeps all version fields in sync, preventing stale assets and updater drift.copy_button_text) and new (button_text) keys so the custom button text from widget settings always renders as expected.'0' values (e.g. blur, border width, padding) as valid instead of falling back to defaults, so zero-style configurations are applied consistently after saving.target="_blank") now include rel="noopener noreferrer" to guard against reverse-tabnabbing and improve cross-window isolation.manage_options capability, preventing non-admin users from accessing analytics data even if they obtain a valid REST nonce.POST /ctc/v1/analytics/events) now enforces per-IP rate limiting and strict payload validation, returning 429 on abusive bursts and 400 for invalid event data to protect the ctc_analytics table.created_at and date ranges, preventing shifted 24h/7d/30d boundaries on non-UTC sites.ctc_analytics table fast while still supporting long-range comparisons.<img class="emoji"> elements; the copy logic now converts these to their alt text so emojis are included in the copied content. Thanks @jayceezaycopy-as="html". Thanks @jayceezayctc/shortcode/display_allowed_html to customize allowed HTML for shortcode display content (e.g. add custom markup support).POST /ctc/v1/analytics/events (public, for frontend tracking); GET endpoints and export for authenticated Pro users.copy-as attribute. Uses CTC CopyEngine with Clipboard API; fallbacks for image (HTTPS/CORS) and legacy browsers.ctc.globalInjector.copyAs.after hook for extensibility.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.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.page=ctc-rules): table with Status toggle, Rule Name/Target, Visual Style, Location; row actions Edit, Duplicate, Delete; search and status filter; empty state.page=ctc (Settings Copy to Clipboard).copy-to-clipboard redirect to Global Injector.get_admin_rules() API for admin list data; Main Rule List and Dashboard use React + Tailwind under .ctc-admin-root.ctc/global_injector/inline_css filter still applies to the final CSS.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()”).?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.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.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.tag="a" for link-style copy buttons now correctly loads the native preset CSS so theme link styling is applied.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…”).?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.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 @akashathuBug fixes and support issues (post-5.0.0) — Thanks to the users who reported these on the support forum.
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 @contemplatetable elements.content="... [...] ..." now copy the correct [ and ] characters. The content attribute is decoded from HTML entities before use.🚀 Major Release – Global Injector & Complete Refactor
[copy] / [ctc] shortcodes with improved attributes and flexibility._load_textdomain_just_in_time notices with proper plugin initialization timing.[ ]) not being decoded properly in content attribute. Thanks @akashathu-- to en-dash inside CSS var() functions like var(--wp--preset--color--bg). Thanks @mikecargalcontent Attribute – Restored proper handling where content attribute contains the text to copy and text attribute is the display text.tag="a" parameter to use theme’s anchor styling instead of custom CTC styling.show-icon="no" parameter to hide the copy icon when not needed.document.execCommand('copy') to modern Clipboard API (navigator.clipboard.writeText()).[copy] in v5+).icon-color shortcode parameter.color to set the custom color for the text. E.g. [copy content="Custom Text.." color="#2dcd78"]Copy me![/copy]icon-color to set the custom color for the icon. E.g. [copy content="Custom Text.." style="icon" icon-color="#9437f6"][/copy]style to show the icon. E.g. [copy content="Custom Text.." style="icon"][/copy]copy_the_code_shortcode_atts for shortcode to redirect the user to another page after copying the content to the clipboard.copy_the_code_localize_vars.New: Added a link to easily upgrade to the premium version which was recently not easily visible.
Improvement: Improve the default button style.
copy_the_code_localize_vars to allow to copy the content as HTMl instead of text.copy_the_code_enabled which is no more useful.Copy the content which is no more useful. Will add the support though filter if required.SVG Icon button style to show the SVG icon instead of button.Cover style to copy the small element in which we could not add the copy button. Such as Emoji and Symbols.Copy Content As default option with text.<br> tags into the new line if the option “Copy Content As” selected as Text.<div> tags into the new line if the option “Copy Content As” selected as Text.<p> tags into the new line if the option “Copy Content As” selected as Text.<li> tags into the new line if the option “Copy Content As” selected as Text.Text.<br> tag converted into the next line. Select the Text from option Copy Content As. Reported by Konrad.<br> tags was not copied as new line. Reported by @psanger.copy_the_code_default_page_settings to change the default page settings.copy_the_code_page_settings to change the page settings.selector to set the JS selector. Default its <pre> html tag.Copy button markup from the copied content from the clipboard.| Version | Download | Type |
|---|---|---|
| 5.5.3 | Download | Stable |
| 5.5.2 | Download | Stable |
| 5.5.1 | Download | Stable |
| 5.5.0 | Download | Stable |
| 5.4.1 | Download | Stable |
| 5.4.0 | Download | Stable |
| 5.3.1 | Download | Stable |
| 5.3.0 | Download | Stable |
| 5.2.0 | Download | Stable |
| 5.1.0 | Download | Stable |
| 5.0.1 | Download | Stable |
| 5.0.0 | Download | Stable |
| 4.1.4 | Download | Stable |
| 4.1.1 | Download | Stable |
| 4.1.0 | Download | Stable |
| 4.0.5 | Download | Stable |
| 4.0.4 | Download | Stable |
| 4.0.3 | Download | Stable |
| 4.0.2 | Download | Stable |
| 4.0.0 | Download | Stable |
| 3.8.3 | Download | Stable |
| 3.8.2 | Download | Stable |
| 3.8.1 | Download | Stable |
| 3.8.0 | Download | Stable |
| 3.7.0 | Download | Stable |
| 3.6.0 | Download | Stable |
| 3.5.2 | Download | Stable |
| 3.5.1 | Download | Stable |
| 3.5.0 | Download | Stable |
| 3.4.3 | Download | Stable |
| 3.4.2 | Download | Stable |
| 3.4.1 | Download | Stable |
| 3.4.0 | Download | Stable |
| 3.3.0 | Download | Stable |
| 3.2.1 | Download | Stable |
| 3.2.0 | Download | Stable |
| 3.1.0 | Download | Stable |
| 3.0.0 | Download | Stable |
| 2.6.5 | Download | Stable |
| 2.6.4 | Download | Stable |
| 2.6.3 | Download | Stable |
| 2.6.2 | Download | Stable |
| 2.6.1 | Download | Stable |
| 2.6.0 | Download | Stable |
| 2.5.0 | Download | Stable |
| 2.4.2 | Download | Stable |
| 2.4.1 | Download | Stable |
| 2.4.0 | Download | Stable |
| 2.3.5 | Download | Stable |
| 2.3.4 | Download | Stable |
| 2.3.3 | Download | Stable |
| 2.3.2 | Download | Stable |
| 2.3.1 | Download | Stable |
| 2.3.0 | Download | Stable |
| 2.2.2 | Download | Stable |
| 2.2.1 | Download | Stable |
| 2.2.0 | Download | Stable |
| 2.1.1 | Download | Stable |
| 2.1.0 | Download | Stable |
| 2.0.0 | Download | Stable |
| 1.8.0 | Download | Stable |
| 1.7.5 | Download | Stable |
| 1.7.4 | Download | Stable |
| 1.7.3 | Download | Stable |
| 1.7.2 | Download | Stable |
| 1.7.1 | Download | Stable |
| 1.7.0 | Download | Stable |
| 1.6.1 | Download | Stable |
| 1.6.0 | Download | Stable |
| 1.5.0 | Download | Stable |
| 1.4.1 | Download | Stable |
| 1.4.0 | Download | Stable |
| 1.3.1 | Download | Stable |
| 1.3.0 | Download | Stable |
| 1.2.0 | Download | Stable |
| 1.1.0 | Download | Stable |
| 1.0.0 | Download | Stable |
| Development | Download | Trunk |