Description
Give readers a clear path back to the original source. Credits Shortcode & Block adds compact, theme-friendly Source or Via attribution links to WordPress posts and pages.
Highlights
- Native Gutenberg block with a live editor preview.
- Simple
[credits]shortcode for any post, page, or widget area. - Site-wide defaults under Settings > Credits.
- Optional colors for the badge, link background, and link text.
- Compact, standard, or spacious gaps between consecutive credits.
- Classic Editor toolbar button for legacy workflows.
- Responsive, theme-friendly output with subtle hover feedback.
- Translation-ready and compatible with WordPress multisite.
- No external service, account, tracking, or front-end JavaScript.
Gutenberg Block
- Open a post or page in the Block Editor.
- Add the Credits Link block by clicking + or typing
/credits. - Choose Source or Via, enter the attribution name, and add its URL.
- Optionally choose accent colors in the block sidebar.
The block is rendered dynamically, so saved content stays clean and current.
Shortcode
Basic source attribution:
[credits link="https://example.com"]Source Name[/credits]
Via attribution:
[credits link="https://example.com" type="via"]Publication Name[/credits]
Using a name attribute:
[credits name="Source Name" link="https://example.com"]
Custom colors:
[credits link="https://example.com" type="source" badge_color="#0073aa" link_color="#f0f0f0" link_text_color="#0073aa"]Source Name[/credits]
Supported attributes:
name– attribution text; inner shortcode content takes precedence.link– destination URL.type–sourceorvia.badge_color– badge background as a 3- or 6-digit hex color.link_color– link area background as a 3- or 6-digit hex color.link_text_color– link text as a 3- or 6-digit hex color.spacing–compact,standard, orspacious; defaults to the site-wide setting.
To keep several credits close together:
[credits link="https://example.com" spacing="compact"]Source Name[/credits]
Site-wide Defaults
Go to Settings > Credits to choose the default credit type, spacing, and optional accent colors. Individual blocks and shortcodes can override those defaults.
Screenshots


Blocks
This plugin provides 1 block.
- Credits Link Insert Source or Via credit link into your post with customizable accent colors.
Installation
- In WordPress, go to Plugins > Add New.
- Search for Credits Shortcode & Block.
- Click Install Now, then Activate.
- Add a Credits Link block, use the
[credits]shortcode, or configure defaults under Settings > Credits.
For a manual installation, upload the plugin folder to /wp-content/plugins/ and activate it from the Plugins screen.
FAQ
-
Can I change how the credit line looks?
-
Yes. Set colors for an individual block or shortcode, configure site-wide defaults under Settings > Credits, or use custom CSS. Without custom colors, the plugin uses neutral styling that inherits the active theme’s link color.
-
Can I add more than one credit to a post?
-
Yes. Add as many blocks or shortcodes as needed. Each credit is rendered independently.
-
What happens if I deactivate the plugin?
-
Your posts are not modified or deleted. Dynamic blocks stop rendering, and shortcode tags remain in post content until the plugin is reactivated.
-
Does the plugin send data to another service?
-
No. The plugin makes no external requests and includes no analytics or tracking.
-
Does it add rel=”nofollow” to links?
-
No. Credit links open in a new tab with
noopener noreferrer. The plugin does not addnofollowautomatically. -
Does it work with the Classic Editor?
-
Yes. When the Classic Editor is active, an Add Credits toolbar button inserts the shortcode for you.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Credits Shortcode & Block” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Credits Shortcode & Block” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.5.0
- Added site-wide spacing defaults under Settings > Credits.
- Added Compact, Standard, and Spacious spacing presets for each block or shortcode.
- Added spacing inheritance and validation tests.
1.4.1
- Fixed Gutenberg block registration on WordPress 5.0 through 5.4.
- Fixed new blocks so they inherit the site-wide default credit type.
- Added block-editor JavaScript translation loading.
- Refreshed the WordPress.org banner, icons, and screenshots.
- Improved directory copy and release metadata.
1.4.0
- Added internationalization support for PHP and block-editor strings.
- Registered the block from
block.jsonmetadata on supported WordPress versions. - Added site-wide defaults under Settings > Credits.
- Added a PHPUnit test suite and PHP 7.4 through 8.4 continuous integration.
- Switched to neutral, theme-friendly default styling while preserving saved colors.
1.3.1
- Sanitized shortcode attributes and applied context-aware escaping to rendered output.
- Restricted accent colors to valid hex values.
- Added a strict HTML allowlist for final shortcode markup.
1.3
- Added the native Credits Link Gutenberg block.
- Added per-credit accent color controls.
- Added hover feedback and block-theme layout compatibility.
- Hardened shortcode rendering and output escaping.
1.2
- Initial public release with shortcode and Classic Editor support.
