Default Theme Headers Generator

Overview

Use this tool to create custom code for Default Theme Headers with register_default_headers() function.

Usage

  • Fill in the user-friendly form.
  • Click the “Update Code” button.
  • Copy the code to your project.
  • Or save it as a snippet and share with the community.

Examples

If you are still learning how to use this tool, check out the following examples:

The function used in the code.
Translation file Text Domain. Optional.
Slug used in the code. Lowercase, with no spaces.
A short descriptive summary.
URL to the header image.
URL to the header image thumbnail.
Slug used in the code. Lowercase, with no spaces.
A short descriptive summary.
URL to the header image.
URL to the header image thumbnail.
Slug used in the code. Lowercase, with no spaces.
A short descriptive summary.
URL to the header image.
URL to the header image thumbnail.
Slug used in the code. Lowercase, with no spaces.
A short descriptive summary.
URL to the header image.
URL to the header image thumbnail.
Slug used in the code. Lowercase, with no spaces.
A short descriptive summary.
URL to the header image.
URL to the header image thumbnail.
  Save Snippet
// Register Default Headers
function custom_default_headers() {

	$headers = array(
		'sky' => array(
			'description'   => __( 'Sky', 'text_domain' ),
			'url'           => '%s/images/headers/sky.jpg',
			'thumbnail_url' => '%s/images/headers/sky-thumbnail.jpg',
		),
		'shore' => array(
			'description'   => __( 'Shore', 'text_domain' ),
			'url'           => '%s/images/headers/shore.jpg',
			'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg',
		),
		'desert' => array(
			'description'   => __( 'Desert', 'text_domain' ),
			'url'           => '%s/images/headers/desert.jpg',
			'thumbnail_url' => '%s/images/headers/desert-thumbnail.jpg',
		),
	);
	register_default_headers( $headers );

}
add_action( 'after_setup_theme', 'custom_default_headers' );