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/jcjason12108-alt/page-specific-favicons/archive/refs/heads/main.zipAdd a unique favicon to any post or page in WordPress. Falls back to your site-wide favicon if none is set.
Description
Page Specific Favicons lets you assign a different favicon (site icon) to each post or page on your WordPress site.
Once installed, a "Custom Favicon" box appears in the editor sidebar for posts and pages. Upload or paste the URL of your favicon image, and it will automatically appear in the browser tab for that page.
If no custom favicon is set, your global Site Icon (from Appearance > Customize > Site Identity) will be used instead.
Includes a preview of the selected icon and an easy "Remove" button.
Features
- Add a unique favicon per page or post
- Uses the WordPress media uploader
- Instant preview of the uploaded favicon
- Easily remove favicon with a single click
- Automatically falls back to site-wide favicon
- Supports standard favicon formats (PNG, ICO, JPG)
Installation
- Upload the plugin folder to
/wp-content/plugins/or install from the Plugins menu. - Activate the plugin.
- Edit any post or page and scroll to the "Custom Favicon" box in the sidebar.
- Upload or paste your favicon URL.
- Save the post — your custom favicon is now active.
Usage
- The meta box named "Custom Favicon" appears for
postandpagetypes. - Use the Upload button to choose an image from the Media Library. The URL is saved to post meta
_custom_favicon. - The plugin outputs standard favicon links and an
apple-touch-iconlink in the document head.
Screenshots
- Upload your custom favicon using the media library.
- See a live preview of the selected icon.
- Remove the favicon and restore default with one click.
Security / Notes
- Version: 1.0.9
- The save handler validates a nonce, prevents autosave/revision writes, and checks the current user's
edit_postcapability before updating post meta. - Saved URLs are sanitized with
esc_url_raw()and URL schemes are limited tohttp,https, anddata. - Admin preview is created via safe DOM methods to avoid raw HTML injection.
Changelog
1.0.9
- Updated the bundled Plugin Update Checker library from 5.6 to 5.7.
1.0.8
- Confirm compatibility with WordPress 7.0 and harden nonce handling during favicon meta saves.
1.0.7
- Bump version for GitHub updater testing.
1.0.6
- Initialize Plugin Update Checker after WordPress finishes loading plugins to avoid activation-time fatal errors.
- Guard the plugin class declaration so installing beside an older copy does not trigger a duplicate class fatal error.
1.0.5
- Add Plugin Update Checker for automatic updates from the GitHub
mainbranch. - Add optional GitHub token support through the
PLUGIN_UPDATE_GITHUB_TOKENconstant or environment variable. - Restrict update detection to branch checks to avoid GitHub Releases endpoint errors.
1.0.4
- Security hardening: capability checks, revision/autosave guards, URL scheme validation, safer admin preview DOM updates.
1.0.3
- Fallback to global site-wide favicon when none is set.
1.0.2
- Add remove favicon button and clear preview.
1.0.1
- Add favicon preview after upload.
- Add plugin URI and metadata.
1.0.0
- Initial release.
Frequently Asked Questions
What file types are supported?
Most standard image formats including .ico, .png, and .jpg.
What happens if I don't set a custom favicon?
The plugin will automatically fall back to your global Site Icon.
Can I use this with custom post types?
Not yet — but support can be added with a small modification.
Support
If you run into issues, please open an issue with steps to reproduce and WordPress/PHP versions.