Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // use this code in header.php here will be fit
- <?php if ( get_header_image() ) : ?>
- <div id="site-header">
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
- <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' ) ); ?>">
- </a>
- </div>
- <?php endif; ?>
- // call in function.php
- */
- function shape_register_custom_background() {
- $args = array(
- 'default-color' => 'e9e0d1',
- );
- $args = apply_filters( 'shape_custom_background_args', $args );
- if ( function_exists( 'wp_get_theme' ) ) {
- add_theme_support( 'custom-background', $args );
- } else {
- define( 'BACKGROUND_COLOR', $args['default-color'] );
- define( 'BACKGROUND_IMAGE', $args['default-image'] );
- add_custom_background();
- }
- }
- add_action( 'after_setup_theme', 'shape_register_custom_background' );
- /**
- /**
- * Implement the Custom Header feature
- */
- require( get_template_directory() . '/includes/custom-header.php' );
- // and put a custom-header.php in inc or includes file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement