BLACK FRIDAY
Save 59% on PageForge Annual $191/year $485/year
Claim 59% Off →
Sticky Copy Button for Code Blocks icon
Actively maintained Tested with WP 7.1 #70 in button

Sticky Copy Button for Code Blocks

Adds a floating "Copy" button to every code block, with extensive styling options, optional line numbers, max-height control, and custom CSS support.

Active installs60+10+ tier
Downloads · 30d133▲ +29.1% vs prev. 30d
Rating4.5/52 reviews
Health score74/100Good
All-time downloads1.3KSince Aug 2025
Support resolved—No recent threads
RequiresWP 5.0PHP 7.4+
Downloads · 7d45▲ +32.4% week over week
Our verdict

Solid choice

Sticky Copy Button for Code Blo… is a solid plugin choice in 2026, with a few things worth checking first. It runs on 60+ sites, is rated 4.5/5 and was last updated 1 week ago, and scores 74/100 on our health check.

  • Actively developed — last update 1 week ago
  • Tested with the latest WordPress (7.1)
  • Small user base (60+ active installs)
  • Very few reviews so far

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

4914Jul 8Aug 21Oct 5
Yesterday4
Daily average (1y)3
Peak day48Feb 20, 2026
Last 12 months1.1K

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where Sticky Copy Button for Code… stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
button >100 10,000 Best button plugins →
code >100 10,000 Best code plugins →
copy #23 10,000 Best copy plugins →
copy button #11 7,366 Best copy button plugins →
line-numbers #18 4,802 Best line-numbers plugins →

Version adoption

Share of active sites per release.

  • 1.6100.0%

Rating breakdown

★★★★★★★★★★ 4.5 from 2 reviews

  • 5★50.0%
  • 4★50.0%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About Sticky Copy Button for Code Blocks

From the official readme · v1.6.0

Description

Sticky Copy Button for Code Blocks automatically adds a floating copy button to each <pre><code> block on your website.
It provides convenient front-end copying for developers, readers, and tutorial users.

Features

This plugin is light, fast, and highly customizable:

  • Adjustable button position (up/down and left/right)
  • Customizable labels (“Copy” / “Copied”)
  • Adjustable font size
  • Background color, text color, or transparent mode
  • Max-height option for large code blocks (with scroll support)
  • Optional line numbers (simple native implementation)
  • Custom CSS that is safely sanitized

No dependencies such as Prism or Highlight.js are required.

Detailed Settings Guide

The following explains every option in the plugin settings page.

1. Button Position

Adjust vertical position (top offset in px)
Moves the button up or down relative to the top of the code block.
Use positive or negative values to fine-tune vertical alignment.

Adjust horizontal position (right offset in px)
Moves the button left or right by adjusting how far it sits from the right edge of the code block.
Use positive or negative values to fine-tune horizontal alignment.

These values help fine-tune button alignment to avoid overlapping with theme elements.

2. Button Text and Behavior

Copy button label
The label shown normally (default: “Copy”).

Label after copying (2 seconds)
Once the text is copied, the button temporarily displays this label.
Default: “Copied”.

3. Button Size

Button size (8–36 px)
Controls the font size of the button.
Padding is automatically adjusted based on this value.

4. Button Colors

Button text color
Hex color of button text.

Button background color
Hex background color.
When copying, the plugin automatically swaps the text and background colors for visual feedback.
However, if the background is transparent, only the text color is swapped.

Always transparent background
If enabled:
– The button background always becomes transparent.
– Only text + border remain visible

5. Code Block Max Height

Enable
Must be checked for the value to apply.

Code block max height (px)
Sets a maximum height (minimum: 100px).
Content taller than this becomes scrollable.

This prevents long code blocks from stretching your page layout.

6. Display Line Numbers

Display Line Numbers (Enable)
Shows simple line numbers next to each line. You can also fine-tune the position of the line numbers (offset adjustment is available).
Notes:
– Line height is unified for consistency.
– Theme-specific code styling is preserved.
– Line wrapping is forcibly disabled.

This is a built-in lightweight alternative to syntax-highlighter libraries.

7. Custom Styles (CSS)

You can add any custom CSS to adjust:

  • Button design
  • Wrapper layout
  • Code spacing
  • Line number appearance

Optionally, you can enable “Add !important to CSS declarations automatically” to force your custom styles to take effect even when the theme’s CSS has higher specificity.

Usable Selectors (CSS) :

  • .copy-code-btn → The copy button
  • .copy-code-btn.copied → The button after Copying
  • .code-block-wrapper → Wrapper of the code block (position: relative)
  • .code-block-wrapper pre → Inner code text area (the <pre> element)
  • .line-numbers → The container holding the line numbers

  • Example:
     .copy-code-btn {
         font-family: "Comic Sans MS", cursive;
         font-weight: 700;
         border: none;
     }

Donate

If you find this plugin useful and would like to support its development,
you can make a voluntary donation via PayPal.

Your support helps keep this plugin maintained and improved.
Thank you!

PayPal: https://www.paypal.me/Kasuga16

Installation

  1. Upload via WordPress Dashboard:

    – In your WordPress dashboard, go to ‘Plugins’ → ‘Add New’.
    – Search for “stick-copy-button-codeblock” and click ‘Install Now’.
    – Click ‘Activate’ once the installation is complete.
    – (Optional) Go to ‘Settings’ → ‘Stick Copy Button’ to configure options.

  2. Manual Installation via FTP:

    – Download the plugin’s zip file and extract it.
    – Connect to your server via FTP and navigate to the “wp-content/plugins/” directory.
    – Upload the extracted “stick-copy-button-codeblock” folder to this directory.
    – Go to ‘Plugins’ in your WordPress dashboard and activate the plugin.
    – (Optional) Go to ‘Settings’ → ‘Stick Copy Button’ to configure options.

Frequently asked questions

Which code blocks does this plugin support?

It supports only code blocks marked up in the pre > code format.

Changelog

1.6.0

  • Refactored CSS settings for broader theme compatibility.
  • Improved stability of line number display.
  • Added line number offset adjustment option.
  • Added automatic !important appending feature for custom CSS.

1.5.1

  • Minor fix to the conditional script loading logic introduced in 1.5.0.

1.5.0

  • Load scripts only when code blocks are detected.

1.4.0

  • Added an option to display line numbers.
  • Minor bug fixes.
  • Updated readme.txt.

1.3.0

  • Changed the method for limiting code block height from line count to pixel-based sizing.
  • Minor bug fixes.

1.2.0

  • Added support for limiting code block height by line count.
  • Added a Custom CSS option, allowing users to apply their own CSS to style the copy button or code blocks.

Full changelog on WordPress.org →

Screenshots

Plugin settings screen
Plugin settings screen
Button display in an actual blog post
Button display in an actual blog post
Line numbers displayed on a code block.
Line numbers displayed on a code block.

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.

Active installs badge Rating badge Health score badge

Best Sticky Copy Button for Code B… alternatives

All button plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 AddQuicktag AddQuicktag This plugin makes it easy to add Quicktags to the html - and visual-editor. by Frank Bueltge 100K+ ★★★★★★★★★★ 4.7 (44) 5 days ago 91
2 WP Edit WP Edit Take complete control over the WordPress content editor. by Josh 40K+ ★★★★★★★★★★ 4 (159) 8 years ago 43
3 Forget About Shortcode Buttons Forget About Shortcode Buttons A visual way to add CSS buttons in the rich text editor and to your themes. by Code Amp 20K+ ★★★★★★★★★★ 4.7 (69) 2 years ago 38
4 jQuery Pin It Button for Images jQuery Pin It Button for Images Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning. by mrsztuczkens 10K+ ★★★★★★★★★★ 4.6 (305) 6 years ago 45
5 Scroll Back To Top Scroll Back To Top This plugin will add a button that allows users to scroll smoothly to the top of the page. by joesexton00 10K+ ★★★★★★★★★★ 4.2 (56) 9 years ago 43
6 Add to Cart Button Custom Text Add to Cart Button Custom Text Allows to customize the Add to cart button text in WooCommerce by product type in both… by Enrique J. Ros 9K+ ★★★★★★★★★★ 4.6 (12) 11 months ago 54
7 Custom Add To Cart Button for WooCommerce Custom Add To Cart Button for WooCommerce Customize the Add to Cart buttons in WooCommerce by changing the text, adding a cart icon… by Kestrel 9K+ ★★★★★★★★★★ 3.9 (8) 2 years ago 40
8 Easy Media Download Easy Media Download Easy Media Download allows you to embed download buttons on your WordPress site. Add file… by Noor Alam 9K+ ★★★★★★★★★★ 4 (28) 1 month ago 80
9 Magic Content & CTA Box Builder – Advanced Gutenberg Blocks for Flexible Page Sections, Headers, Buttons, Shape Dividers, and Layout Options Magic Content & CTA Box Builder Advanced Gutenberg Blocks for Flexible Page Sections, Call to Action, Headers, Buttons… by AF themes 5K+ ★★★★★★★★★★ No reviews 10 months ago 33
10 Back To The Top Button Back To The Top Button Simple plugin that allow you add back to top button and get to the top of the page when… by YYDevelopment 4K+ ★★★★★★★★★★ 5 (27) 2 months ago 85

FAQ

Sticky Copy Button for Code Blocks: quick answers

Straight answers, pulled from live WordPress.org data.

Live data from WordPress.org · checked Oct 6, 2026

Is Sticky Copy Button for Code Blo… free?

Yes. Sticky Copy Button for Code Blo… is free to download and use from the official WordPress.org plugin directory.

Is Sticky Copy Button for Code Blo… safe to use in 2026?

Sticky Copy Button for Code Blo… is a solid plugin choice in 2026, with a few things worth checking first. It runs on 60+ sites, is rated 4.5/5 and was last updated 1 week ago, and scores 74/100 on our health check.

How many websites use Sticky Copy Button for Code Blo…?

Sticky Copy Button for Code Blo… is active on 60+ WordPress websites and has been downloaded 1,286 times since it launched in August 2025. It was downloaded 133 times in the last 30 days.

Does Sticky Copy Button for Code Blo… work with WordPress 7.1?

Yes. The developer has tested Sticky Copy Button for Code Blo… up to WordPress 7.1.2, the latest release. It requires WordPress 5.0 or newer.

What PHP version does Sticky Copy Button for Code Blo… need?

Sticky Copy Button for Code Blo… requires PHP 7.4 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was Sticky Copy Button for Code Blo… last updated?

The latest version, 1.6.0, was released on September 28, 2026 (1 week ago).

Who makes Sticky Copy Button for Code Blo…?

Sticky Copy Button for Code Blo… is developed and maintained by Kasuga.

What are the best alternatives to Sticky Copy Button for Code Blo…?

The most popular alternatives to Sticky Copy Button for Code Blo… are AddQuicktag (100K+ installs), WP Edit (40K+ installs) and Forget About Shortcode Butt… (20K+ installs).

Powered by PageForge

Want thousands of pages that rank like these? Build them in an afternoon.

This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.

  • CSV, Google Sheets & API data sources
  • AI content, schema & internal links per page
  • Works with Elementor, Gutenberg, Yoast & Rank Math
  • Free on WordPress.org — no credit card
Sarah is here to help!
Hi there! 👋 Need help finding what you're looking for?
Sarah
Sarah
Online & Ready to Help
Hi there! 👋 Need help finding what you're looking for?

We'll use this to continue our conversation

Just now ✓ Verified

Join 500+ SEO Pros Scaling Their Strategy

Get exclusive programmatic SEO tactics, AI content workflows, and the latest PageForge updates delivered straight to your inbox. Stay ahead of the algorithm.

We care about your data in our privacy policy.