Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // W PLIKU header.php ZMIENIASZ TEN KAWAŁEK KODU:
- <hgroup>
- <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
- <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
- </hgroup>
- // NA TEN:
- <?php if ( get_theme_mod( 'twentytwelve_logo' ) ) : ?>
- <div class='site-logo'>
- <a href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>' rel='home'><img src='<?php echo esc_url( get_theme_mod( 'twentytwelve_logo' ) ); ?>' alt='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>'></a>
- </div>
- <?php else : ?>
- <hgroup>
- <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
- <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
- </hgroup>
- <?php endif; ?>
- //POTEM W functions.php DODAJESZ TAKI KAWAŁEK:
- function twentytwelve_theme_customizer( $wp_customize ) {
- $wp_customize->add_section( 'twentytwelve_logo_section' , array(
- 'title' => __( 'Logo', 'twentytwelve' ),
- 'priority' => 30,
- 'description' => 'Upload a logo to replace the default site name and description in the header',
- ) );
- $wp_customize->add_setting( 'twentytwelve_logo' );
- $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'twentytwelve_logo', array(
- 'label' => __( 'Logo', 'twentytwelve' ),
- 'section' => 'twentytwelve_logo_section',
- 'settings' => 'twentytwelve_logo',
- ) ) );
- }
- add_action('customize_register', 'twentytwelve_theme_customizer');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement