{"id":29567,"date":"2014-05-18T17:20:22","date_gmt":"2014-05-18T17:20:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/add-custom-header-images\/"},"modified":"2025-04-03T21:24:31","modified_gmt":"2025-04-03T21:24:31","slug":"add-custom-header-images","status":"publish","type":"plugin","link":"https:\/\/en-gb.wordpress.org\/plugins\/add-custom-header-images\/","author":6820837,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.3.5","stable_tag":"2.3.5","tested":"6.8.5","requires":"5.2","requires_php":"5.6","requires_plugins":null,"header_name":"Add Custom Header Images","header_author":"Andy Fragen","header_description":"","assets_banners_color":"f5f5f5","last_updated":"2025-04-03 21:24:31","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/afragen\/add-custom-header-images","header_author_uri":"https:\/\/thefragens.com","rating":4.8,"author_block_rating":4.5454545454545,"active_installs":500,"downloads":44848,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":1,"sections":["description","installation","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"afragen","date":"2014-05-18 17:28:08"},"1.0.1":{"tag":"1.0.1","author":"afragen","date":"2014-05-18 18:25:33"},"1.0.2":{"tag":"1.0.2","author":"afragen","date":"2014-11-08 16:08:00"},"1.0.3":{"tag":"1.0.3","author":"afragen","date":"2014-11-08 17:24:30"},"1.0.4":{"tag":"1.0.4","author":"afragen","date":"2014-12-12 00:31:14"},"1.1.0":{"tag":"1.1.0","author":"afragen","date":"2015-02-23 15:13:51"},"1.2.0":{"tag":"1.2.0","author":"afragen","date":"2015-02-23 18:21:29"},"1.3.0":{"tag":"1.3.0","author":"afragen","date":"2015-02-23 18:40:11"},"1.3.1":{"tag":"1.3.1","author":"afragen","date":"2015-05-02 22:49:23"},"1.3.2":{"tag":"1.3.2","author":"afragen","date":"2015-05-03 12:14:06"},"1.4.0":{"tag":"1.4.0","author":"afragen","date":"2015-11-29 22:58:29"},"1.4.1":{"tag":"1.4.1","author":"afragen","date":"2016-07-10 14:19:12"},"1.4.2":{"tag":"1.4.2","author":"afragen","date":"2016-07-19 17:57:16"},"1.5.0":{"tag":"1.5.0","author":"afragen","date":"2016-08-14 15:13:06"},"1.5.1":{"tag":"1.5.1","author":"afragen","date":"2016-12-06 19:38:33"},"1.5.2":{"tag":"1.5.2","author":"afragen","date":"2017-05-23 17:49:04"},"1.6.0":{"tag":"1.6.0","author":"afragen","date":"2017-08-26 21:47:31"},"1.6.1":{"tag":"1.6.1","author":"afragen","date":"2017-11-12 06:26:38"},"1.7.0":{"tag":"1.7.0","author":"afragen","date":"2018-05-19 18:07:51"},"1.8.0":{"tag":"1.8.0","author":"afragen","date":"2018-08-27 15:00:21"},"1.8.1":{"tag":"1.8.1","author":"afragen","date":"2019-10-30 18:40:32"},"1.9.0":{"tag":"1.9.0","author":"afragen","date":"2019-12-03 22:28:24"},"2.0.1":{"tag":"2.0.1","author":"afragen","date":"2020-03-04 04:21:56"},"2.0.2":{"tag":"2.0.2","author":"afragen","date":"2020-03-28 18:40:12"},"2.0.3":{"tag":"2.0.3","author":"afragen","date":"2021-03-05 22:45:59"},"2.1.0":{"tag":"2.1.0","author":"afragen","date":"2022-05-10 20:01:05"},"2.2.0":{"tag":"2.2.0","author":"afragen","date":"2023-01-13 20:15:49"},"2.3.0":{"tag":"2.3.0","author":"afragen","date":"2023-02-06 03:03:28"},"2.3.1":{"tag":"2.3.1","author":"afragen","date":"2023-02-08 21:12:42"},"2.3.2":{"tag":"2.3.2","author":"afragen","date":"2023-02-08 22:38:29"},"2.3.3":{"tag":"2.3.3","author":"afragen","date":"2024-07-11 21:21:00"},"2.3.4":{"tag":"2.3.4","author":"afragen","date":"2024-11-01 18:10:22"},"2.3.5":{"tag":"2.3.5","author":"afragen","date":"2025-04-03 21:24:31"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":1,"5":3},"assets_icons":[],"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2560195,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2560195,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.2.0","1.3.0","1.3.1","1.3.2","1.4.0","1.4.1","1.4.2","1.5.0","1.5.1","1.5.2","1.6.0","1.6.1","1.7.0","1.8.0","1.8.1","1.9.0","2.0.1","2.0.2","2.0.3","2.1.0","2.2.0","2.3.0","2.3.1","2.3.2","2.3.3","2.3.4","2.3.5"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2846,163,2847],"plugin_category":[50],"plugin_contributors":[78960],"plugin_business_model":[],"class_list":["post-29567","plugin","type-plugin","status-publish","hentry","plugin_tags-headers","plugin_tags-images","plugin_tags-rotate-headers","plugin_category-media","plugin_contributors-afragen","plugin_committers-afragen"],"banners":{"banner":"https:\/\/ps.w.org\/add-custom-header-images\/assets\/banner-772x250.png?rev=2560195","banner_2x":"https:\/\/ps.w.org\/add-custom-header-images\/assets\/banner-1544x500.png?rev=2560195","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/add-custom-header-images_f5f5f5.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Remove default header images and load custom header images from 'The Headers' page. Allows for easy selection of random header images in your theme.<\/p>\n\n<p>A plugin that should be able to remove default headers for a theme and add custom headers based upon the article written by <a href=\"http:\/\/juliobiason.net\/2011\/10\/25\/twentyeleven-with-easy-rotating-header-images\/\">Julio Biason<\/a> who was inspired by <a href=\"http:\/\/wpti.ps\/?p=107\">wpti.ps<\/a>.<\/p>\n\n<p>Create a Page named <strong>The Headers<\/strong>. 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.<\/p>\n\n<p>Once the custom header images are loaded, just go to <code>Appearance &gt; Header<\/code> or <code>Customize &gt; Header Image<\/code> and select <code>Randomize suggested headers<\/code>.<\/p>\n\n<p>The plugin will display an error notice if there is <strong>not<\/strong> a page titled, <strong>The Headers<\/strong>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Create a new page. It can be private. It must be titled <code>The Headers<\/code>. 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.<\/li>\n<li>Upload <code>add-custom-header-images<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Go to <code>Appearance &gt; Header<\/code> or <code>Customize &gt; Header Image<\/code> and select <code>Randomize<\/code> from the Default Images section.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>2.3.5 \/ 2025-04-03<\/h4>\n\n<ul>\n<li>add GA to generate POT<\/li>\n<li>change startup action hook to <code>after_setup_theme<\/code> for translations<\/li>\n<\/ul>\n\n<h4>2.3.4 \/ 2024-11-01<\/h4>\n\n<ul>\n<li>remove <code>load_plugin_textdomain()<\/code><\/li>\n<\/ul>\n\n<h4>2.3.3 \/ 2023-07-21<\/h4>\n\n<ul>\n<li>use 'all' over 'any' in query, perhaps better<\/li>\n<li>call <code>wp_get_attachment_image()<\/code> to populate specific attributes<\/li>\n<\/ul>\n\n<h4>2.3.2 \/ 2023-02-08<\/h4>\n\n<ul>\n<li>improve WP_Query for single call<\/li>\n<\/ul>\n\n<h4>2.3.1 \/ 2023-02-08<\/h4>\n\n<ul>\n<li>fix to use public or private pages<\/li>\n<\/ul>\n\n<h4>2.3.0 \/ 2023-02-05<\/h4>\n\n<ul>\n<li>PHP 8.1 compatibility changes<\/li>\n<li>update for deprecated <code>get_page_by_title()<\/code><\/li>\n<li>start from <code>plugins_loaded<\/code><\/li>\n<\/ul>\n\n<h4>2.2.0 \/ 2023-01-13<\/h4>\n\n<ul>\n<li>update GitHub Actions<\/li>\n<li>update to add alt text to header image<\/li>\n<\/ul>\n\n<h4>2.1.0 \/ 2021-07-07<\/h4>\n\n<ul>\n<li>add @10up GitHub Actions for SVN<\/li>\n<\/ul>\n\n<h4>2.0.3 \/ 2020-08-01<\/h4>\n\n<ul>\n<li>add check for PHP warning<\/li>\n<\/ul>\n\n<h4>2.0.2 \/ 2020-03-28<\/h4>\n\n<ul>\n<li>initialize some variables<\/li>\n<\/ul>\n\n<h4>2.0.1 \/ 2020-03-03<\/h4>\n\n<ul>\n<li>add header image support to theme if none exists<\/li>\n<li>parse images from page blocks<\/li>\n<li>refactor class methods<\/li>\n<\/ul>\n\n<h4>1.9.0<\/h4>\n\n<ul>\n<li>always load <code>after_theme_setup<\/code> filter<\/li>\n<\/ul>\n\n<h4>1.8.1<\/h4>\n\n<ul>\n<li>correctly initialize <code>load_plugin_textdomain()<\/code><\/li>\n<\/ul>\n\n<h4>1.8.0<\/h4>\n\n<ul>\n<li>simplify admin notice<\/li>\n<li>WPCS compliant<\/li>\n<li>fixed to use <code>wp_get_attachment_url()<\/code>, thanks @poulh<\/li>\n<\/ul>\n\n<h4>1.7.0<\/h4>\n\n<ul>\n<li>use WP_Query instead of <code>get_children()<\/code><\/li>\n<li>only load <code>after_theme_setup<\/code> hook on front end<\/li>\n<\/ul>\n\n<h4>1.6.1<\/h4>\n\n<ul>\n<li>update <em>Tested to<\/em><\/li>\n<li>simplify conditional<\/li>\n<\/ul>\n\n<h4>1.6.0<\/h4>\n\n<ul>\n<li>don't run from constructor<\/li>\n<li>requires PHP 5.3, sorta<\/li>\n<\/ul>\n\n<h4>1.5.2<\/h4>\n\n<ul>\n<li>use class variables to hold title and page data to reduce number of calls to database<\/li>\n<\/ul>\n\n<h4>1.5.1<\/h4>\n\n<ul>\n<li>set <code>after_theme_setup<\/code> hook to use later priority to ensure $_wp_default_headers is set, fixes removal of default images<\/li>\n<\/ul>\n\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>removed specific srcset code as it was unnecessary and caused failures. <code>srcset<\/code> needs to be set correctly in <code>header.php<\/code><\/li>\n<\/ul>\n\n<h4>1.4.2<\/h4>\n\n<ul>\n<li>fixed malformed closing <code>strong<\/code> tag in error message<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>escape translations of page name<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>added srcset for responsive image sizes<\/li>\n<li>tested and updated for WP 4.4.0<\/li>\n<\/ul>\n\n<h4>1.3.3<\/h4>\n\n<ul>\n<li>tested to 4.3<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>load textdomain early so translations work.<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>fix readme.txt as plugin name generic<\/li>\n<li>simplify warning, remove nested if statements<\/li>\n<li>update .pot<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>better i18n strings, updated POT<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>move <code>remove_default_header_images<\/code> to run only if <strong>The Headers<\/strong> page is present. Should fix a PHP Notice too.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>remove <code>deactivate_plugins<\/code> to and just display an error notice for better compatibility.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>added some error checking<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>more graceful exit and return<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>exit after deactivating plugin when not able to be activated<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Add .pot files<\/li>\n<li>Fix short description by removing Markdown<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial commit to WordPress repository<\/li>\n<\/ul>","raw_excerpt":"Remove default header images and load custom header images from &#039;The Headers&#039; page. Allows for easy selection of random header images in your theme.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/29567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=29567"}],"author":[{"embeddable":true,"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/afragen"}],"wp:attachment":[{"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=29567"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=29567"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=29567"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=29567"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=29567"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/en-gb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=29567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}