

The Code Snippets admin list with the <strong>ID</strong>, <strong>Shortcode</strong> and <strong>Copies</strong> columns.
Clipboard Snippet Copier lets you share ready-to-use shortcodes, demo layouts, or any reusable code snippets with your visitors. Click a button and the snippet is copied straight to their clipboard. No manual selection, no copy/paste errors.
You decide whether the snippet stays hidden (fetched only when copied) or is displayed inline as a styled code block. Either mode is one click away for the visitor.
<pre><code> block with a copy button on top.[clipsnco_code_copy_btn] shortcode) onto any page.[clipsnco_code_copy_btn id="123" label="Copy Code"]
Where 123 is the ID of your snippet (visible in the Code Snippets admin list).
id (required, integer) — the snippet ID.label (optional, string) — button text. Defaults to the value set on the Settings page.class (optional, string) — extra CSS classes added to the button.inline (optional, “yes” / “no”) — when yes, the snippet is rendered as a <pre><code> block with a copy button on top. Default no.language (optional, string) — e.g. php, js, css. Adds a language-xxx class on the <code> element so syntax-highlighter libraries (Prism.js, highlight.js) can colourise it.Examples:
[clipsnco_code_copy_btn id="42" label="Copy shortcode"][clipsnco_code_copy_btn id="42" inline="yes" language="php"][clipsnco_code_copy_btn id="42" class="my-cta-btn"]In the block editor, search for “Clipboard Snippet” and insert it. The sidebar lets you set:
The block is server-rendered, so you can switch between block and shortcode usage freely.
If your page builder won’t let you drop a <button> element, you can put any element on the page with the data attribute or the helper class — the plugin’s frontend script picks it up automatically:
<a href="#" class="wcp-code-copy-btn" data-codecopy-id="123">Copy</a>
…or, when even attributes aren’t allowed, use the class-only form:
<span class="wcp-code-copy-btn data-codecopy-id-123">Copy</span>
Code Snippets Settings lets you configure:
Every successful copy by a non-editor user bumps a _clipsnco_copy_count post meta value. The count is shown in the Copies column on the snippets admin list. Click the column header to sort by most-copied.
The button receives the class wcp-code-copy-btn plus anything you add via the shortcode/block class attribute. The inline-mode wrapper uses these classes (override them from your theme):
.clipsnco-inline-wrap — outer container.clipsnco-inline-toolbar — top bar containing the copy button.clipsnco-pre — the <pre> element.clipsnco-code — the <code> element (also gets language-xxx when set)