Create a Page named The Headers. Then upload header images (media files) to the the page. The page may have a visibility of private. All images displayed on the page will be parsed, those attached to the page and those added via image blocks.
Once the custom header images are loaded, just go to
Appearance > Header or
Customize > Header Image and select
Randomize suggested headers.
The plugin will display an error notice if there is not a page titled, The Headers.
Thanks to Andrijana Nikolic at Web Hosting Geeks for translation help.
- Create a new page. It can be private. It must be titled
The Headers. Add any images that you want to use as custom header images to this page. Header images should be cropped appropriately for the base theme.
add-custom-header-imagesdirectory to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to
Appearance > Headeror
Customize > Header Imageand select
Randomizefrom the Default Images section.
Contributors & Developers
“Add Custom Header Images” is open source software. The following people have contributed to this plugin.Contributors
2.1.0 / 2021-07-07
- add @10up GitHub Actions for SVN
2.0.3 / 2020-08-01
- add check for PHP warning
2.0.2 / 2020-03-28
- initialize some variables
2.0.1 / 2020-03-03
- add header image support to theme if none exists
- parse images from page blocks
- refactor class methods
- always load
- correctly initialize
- simplify admin notice
- WPCS compliant
- fixed to use
wp_get_attachment_url(), thanks @poulh
- use WP_Query instead of
- only load
after_theme_setuphook on front end
- update Tested to
- simplify conditional
- don’t run from constructor
- requires PHP 5.3, sorta
- use class variables to hold title and page data to reduce number of calls to database
after_theme_setuphook to use later priority to ensure $_wp_default_headers is set, fixes removal of default images
- removed specific srcset code as it was unnecessary and caused failures.
srcsetneeds to be set correctly in
- fixed malformed closing
strongtag in error message
- escape translations of page name
- added srcset for responsive image sizes
- tested and updated for WP 4.4.0
- tested to 4.3
- load textdomain early so translations work.
- fix readme.txt as plugin name generic
- simplify warning, remove nested if statements
- update .pot
- better i18n strings, updated POT
remove_default_header_imagesto run only if The Headers page is present. Should fix a PHP Notice too.
deactivate_pluginsto and just display an error notice for better compatibility.
- added some error checking
- more graceful exit and return
- exit after deactivating plugin when not able to be activated
- Add .pot files
- Fix short description by removing Markdown
- Initial commit to WordPress repository