SHARE
TWEET

Untitled

a guest Feb 3rd, 2014 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // W PLIKU header.php ZMIENIASZ TEN KAWAŁEK KODU:
  2.  
  3. <hgroup>
  4.         <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>
  5.         <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
  6. </hgroup>
  7.  
  8. // NA TEN:
  9.  
  10. <?php if ( get_theme_mod( 'twentytwelve_logo' ) ) : ?>
  11.     <div class='site-logo'>
  12.         <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>
  13.     </div>
  14. <?php else : ?>
  15.         <hgroup>
  16.                 <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>
  17.                 <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
  18.         </hgroup>
  19. <?php endif; ?>
  20.  
  21. //POTEM W functions.php DODAJESZ TAKI KAWAŁEK:
  22.  
  23. function twentytwelve_theme_customizer( $wp_customize ) {
  24.  $wp_customize->add_section( 'twentytwelve_logo_section' , array(
  25.   'title'  => __( 'Logo', 'twentytwelve' ),
  26.   'priority' => 30,
  27.   'description' => 'Upload a logo to replace the default site name and description in the header',
  28. ) );
  29. $wp_customize->add_setting( 'twentytwelve_logo' );
  30. $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'twentytwelve_logo', array(
  31.  'label' => __( 'Logo', 'twentytwelve' ),
  32.  'section'  => 'twentytwelve_logo_section',
  33.  'settings' => 'twentytwelve_logo',
  34. ) ) );
  35. }
  36. add_action('customize_register', 'twentytwelve_theme_customizer');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top