Snippets repository for WordPress developpers

Browse
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
// into functions.php
$logo_width = 120;
$logo_height = 90;
// If the retina setting is active, double the recommended width and height.
if ( get_theme_mod( 'retina_logo', false ) ) {
$logo_width = floor( $logo_width * 2 );
$logo_height = floor( $logo_height * 2 );
}
add_theme_support(
'custom-logo',
array(
'height' => $logo_height,
'width' => $logo_width,
'flex-height' => true,
'flex-width' => true,
)
);
// into functions.php $logo_width = 120; $logo_height = 90; // If the retina setting is active, double the recommended width and height. if ( get_theme_mod( 'retina_logo', false ) ) { $logo_width = floor( $logo_width * 2 ); $logo_height = floor( $logo_height * 2 ); } add_theme_support( 'custom-logo', array( 'height' => $logo_height, 'width' => $logo_width, 'flex-height' => true, 'flex-width' => true, ) );
// into functions.php
$logo_width  = 120;
$logo_height = 90;
// If the retina setting is active, double the recommended width and height.
if ( get_theme_mod( 'retina_logo', false ) ) {
  $logo_width  = floor( $logo_width * 2 );
  $logo_height = floor( $logo_height * 2 );
}
add_theme_support(
  'custom-logo',
  array(
    'height'      => $logo_height,
    'width'       => $logo_width,
    'flex-height' => true,
    'flex-width'  => true,
  )
);
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
// Use in theme files
<?php the_custom_logo();?>
// Use in theme files <?php the_custom_logo();?>
// Use in theme files
<?php the_custom_logo();?>

Warning: Trying to access array offset on null in /home/clients/7f7a8d8eb6e40c50d3548b06c548734d/web/wp-includes/class-wp-query.php on line 3766

Categories

Tags