Last active
July 12, 2016 23:10
-
-
Save mor10/d59ec781865b88173c649217646e1488 to your computer and use it in GitHub Desktop.
Change the default size of the Site Logo in a Twenty Sixteen child theme
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 | |
function twentysixteen_setup() { | |
/* | |
* Make theme available for translation. | |
* Translations can be filed in the /languages/ directory. | |
* If you're building a theme based on Twenty Sixteen, use a find and replace | |
* to change 'twentysixteen' to the name of your theme in all the template files | |
*/ | |
load_theme_textdomain( 'wpcampus', get_template_directory() . '/languages' ); | |
// Add default posts and comments RSS feed links to head. | |
add_theme_support( 'automatic-feed-links' ); | |
/* | |
* Let WordPress manage the document title. | |
* By adding theme support, we declare that this theme does not use a | |
* hard-coded <title> tag in the document head, and expect WordPress to | |
* provide it for us. | |
*/ | |
add_theme_support( 'title-tag' ); | |
/* | |
* Enable support for custom logo. | |
* | |
* @since Twenty Sixteen 1.2 | |
*/ | |
add_theme_support( 'custom-logo', array( | |
'height' => 240, | |
'width' => 240, | |
'flex-height' => true, | |
'flex-width' => true | |
) ); | |
/* | |
* Enable support for Post Thumbnails on posts and pages. | |
* | |
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails | |
*/ | |
add_theme_support( 'post-thumbnails' ); | |
set_post_thumbnail_size( 1200, 9999 ); | |
// This theme uses wp_nav_menu() in two locations. | |
register_nav_menus( array( | |
'primary' => __( 'Primary Menu', 'wpcampus' ), | |
'social' => __( 'Social Links Menu', 'wpcampus' ), | |
) ); | |
/* | |
* Switch default core markup for search form, comment form, and comments | |
* to output valid HTML5. | |
*/ | |
add_theme_support( 'html5', array( | |
'search-form', | |
'comment-form', | |
'comment-list', | |
'gallery', | |
'caption', | |
) ); | |
/* | |
* Enable support for Post Formats. | |
* | |
* See: https://codex.wordpress.org/Post_Formats | |
*/ | |
add_theme_support( 'post-formats', array( | |
'aside', | |
'image', | |
'video', | |
'quote', | |
'link', | |
'gallery', | |
'status', | |
'audio', | |
'chat', | |
) ); | |
/* | |
* This theme styles the visual editor to resemble the theme style, | |
* specifically font, colors, icons, and column width. | |
*/ | |
add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) ); | |
// Indicate widget sidebars can use selective refresh in the Customizer. | |
add_theme_support( 'customize-selective-refresh-widgets' ); | |
} |
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
.custom-logo { | |
max-width: 65%; | |
} | |
@media screen and (min-width: 1240px) { | |
.custom-logo { | |
max-width: 50%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment