Advertisement
firoze

customer header

Mar 12th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. // use this code in header.php here will be fit
  2. <?php if ( get_header_image() ) : ?>
  3. <div id="site-header">
  4. <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
  5. <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
  6. </a>
  7. </div>
  8. <?php endif; ?>
  9.  
  10.  
  11.  
  12.  
  13. // call in function.php
  14. */
  15. function shape_register_custom_background() {
  16. $args = array(
  17. 'default-color' => 'e9e0d1',
  18. );
  19.  
  20. $args = apply_filters( 'shape_custom_background_args', $args );
  21.  
  22. if ( function_exists( 'wp_get_theme' ) ) {
  23. add_theme_support( 'custom-background', $args );
  24. } else {
  25. define( 'BACKGROUND_COLOR', $args['default-color'] );
  26. define( 'BACKGROUND_IMAGE', $args['default-image'] );
  27. add_custom_background();
  28. }
  29. }
  30. add_action( 'after_setup_theme', 'shape_register_custom_background' );
  31.  
  32. /**
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. /**
  40. * Implement the Custom Header feature
  41. */
  42. require( get_template_directory() . '/includes/custom-header.php' );
  43.  
  44.  
  45. // and put a custom-header.php in inc or includes file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement