Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active October 20, 2019 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanaf1979/faae08c9e11e91beca2f11b3109cc96e to your computer and use it in GitHub Desktop.
Save vanaf1979/faae08c9e11e91beca2f11b3109cc96e to your computer and use it in GitHub Desktop.
Gist for my article: WordPress: Add custom logo support to your theme. https://vanaf1979.nl/wordpress-add-custom-logo-support-to-your-theme/
<?php
function config_custom_logo() {
// Custom image size created somewhere in your code.
add_image_size( 'custom-image-size' , 200 , 200 , true );
$defaults = array(
'height' => 'custom-image-size',
'width' => 'custom-image-size',
'flex-height' => true,
'flex-width' => true,
'header-text' => array( ),
);
add_theme_support( 'custom-logo' , $defaults );
}
add_action( 'after_setup_theme' , 'config_custom_logo' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment