Last active
June 2, 2022 05:54
-
-
Save frontend-coder/36537217555ce158349b265d1e320748 to your computer and use it in GitHub Desktop.
27.Кастомайзер. Лого. #wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function themename_custom_logo_setup() { | |
$defaults = array( | |
'height' => 100, | |
'width' => 400, | |
'flex-height' => true,//не враховуе пропорції 1:4 | |
'flex-width' => true, | |
'header-text' => array( 'site-title', 'site-description' ), | |
'unlink-homepage-logo' => true, | |
); | |
add_theme_support( 'custom-logo', $defaults ); | |
// свойствах сайта появляется возможность загружать логотип сайта |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(has_custom_logo()) : ?> | |
<?php the_custom_logo(); ?> | |
<?php else: ?> | |
<a class="" href="<?php echo home_url('/') ?>">Navbar</a> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment