Last active
January 2, 2016 19:09
-
-
Save azizultex/8347980 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /** Add support for custom header */ | |
| add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 80, 'textcolor' => '333333', 'admin_header_callback' => 'georgia_admin_style' ) ); | |
| /** Register a custom admin callback to display the custom header preview with the same style as is shown on the front end */ | |
| function georgia_admin_style() { | |
| $headimg = sprintf( '.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Georgia, Times, serif; min-height: %spx; }', get_header_image(), HEADER_IMAGE_HEIGHT ); | |
| $h1 = sprintf( '#headimg h1, #headimg h1 a { color: #%s; font-size: 30px; font-variant: small-caps; font-weight: normal; line-height: 36px; margin: 10px 0 0; text-decoration: none; }', esc_html( get_header_textcolor() ) ); | |
| $desc = sprintf( '#headimg #desc { color: #%s; font-size: 14px; font-style: italic; line-height: 1; margin: 0; }', esc_html( get_header_textcolor() ) ); | |
| printf( '<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment