Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/amannex/copyright-date-block-wordpress/archive/refs/heads/main.zipCopyright Date Block for WordPress
A lightweight WordPress Gutenberg block that automatically displays a dynamic copyright notice with the current year — perfect for footers, sidebars, and anywhere you need an always-up-to-date copyright line.
📸 Preview
Add the Copyright Date block from the block inserter and it instantly renders a copyright notice that always reflects the current year — no manual updates needed.
✨ Features
- 📅 Dynamic Year — Automatically displays the current year; no manual updates required year after year
- 📆 Year Range Support — Optionally set a start year to show a range like
© 2020–2025 - ✏️ Custom Text — Add a custom name or brand text alongside the copyright symbol
- 🎨 Full Block Editor Support — Integrates natively with the WordPress block editor (Gutenberg)
- 🖌️ Typography & Color Controls — Leverages WordPress core block supports for text color, background color, and font settings
- 📱 Responsive — Renders cleanly across all screen sizes
- 🧩 No Shortcodes Needed — Pure block-based implementation
- ⚡ Lightweight — Minimal footprint with no external dependencies
🗂️ File Structure
copyright-date-block-wordpress/
├── build/ # Compiled production assets (auto-generated)
│ ├── index.js # Compiled block JavaScript
│ ├── index.asset.php # Auto-generated asset dependencies & version
│ └── style-index.css # Compiled block styles
├── src/ # Source files
│ ├── block.json # Block metadata (name, attributes, supports)
│ ├── edit.js # Block editor (backend) component
│ ├── save.js # Block save / frontend output component
│ ├── editor.scss # Editor-only styles
│ └── style.scss # Frontend + editor shared styles
├── .gitignore
├── copyright-date-block.php # Main plugin file — registers the block
├── package.json # Node dependencies & build scripts
├── package-lock.json
└── README.md
🚀 Installation
From Source (Development)
-
Clone the repository into your WordPress plugins directory:
git clone https://github.com/amannex/copyright-date-block-wordpress.git wp-content/plugins/copyright-date-block-wordpress -
Install Node dependencies:
cd copyright-date-block-wordpress npm install -
Build the plugin assets:
npm run build -
Activate the plugin from your WordPress Admin → Plugins dashboard.
Manual Installation
- Download the repository as a
.zipfile from GitHub. - Go to WordPress Admin → Plugins → Add New → Upload Plugin.
- Upload the
.zipfile and click Install Now. - Click Activate Plugin.
🛠️ Usage
- Open any page, post, or template in the WordPress block editor.
- Click the Block Inserter (
+) or type/copyrightin the editor. - Select the Copyright Date block.
- Use the block settings panel (right sidebar) to:
- Set a start year for a year range (e.g.,
2020–2025) - Edit the display name or brand text
- Toggle displaying just the current year vs. a range
- Set a start year for a year range (e.g.,
- Use Typography and Color controls in the block toolbar to style the output to match your theme.
Example Output
© 2020–2025 Your Brand Name
or simply:
© 2025 Your Brand Name
⚙️ Block Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
startYear |
string | "" |
The starting year for a copyright year range |
showStartYear |
boolean | false |
Whether to show a year range or just current year |
displayName |
string | "" |
Name or brand text to display after the year |
💻 Development
Prerequisites
- Node.js v16+
- npm v8+
- A local WordPress installation
Available Scripts
# Start development mode with file watching
npm run start
# Build for production
npm run build
# Lint JS files
npm run lint:js
# Lint CSS/SCSS files
npm run lint:css
This plugin uses @wordpress/scripts for its build toolchain.
📋 Requirements
| Requirement | Version |
|---|---|
| WordPress | 5.9+ |
| PHP | 7.4+ |
| Node.js (dev) | 16+ |
| Block Editor | Required |
Note: This block requires the WordPress block editor (Gutenberg). It is not compatible with the Classic Editor.
🤝 Contributing
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes and commit:
git commit -m "Add your feature" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request on GitHub
Please follow WordPress Coding Standards for any contributions.
🐛 Issues & Support
Found a bug or have a feature request? Open an issue on GitHub.
📄 License
This plugin is licensed under the GNU General Public License v2.0 or later.
Copyright (C) 2025 amannex
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
🔗 Links
- 🐙 GitHub Repository: https://github.com/amannex/copyright-date-block-wordpress
- 📦 WordPress Block Editor Handbook: https://developer.wordpress.org/block-editor/