replacing the static call to logo.png with add_custom_image_header so
now you can update the logo via theme options
This commit is contained in:
@@ -41,6 +41,21 @@ function roots_setup() {
|
|||||||
// http://codex.wordpress.org/Post_Formats
|
// http://codex.wordpress.org/Post_Formats
|
||||||
// add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
|
// add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
|
||||||
|
|
||||||
|
// http://codex.wordpress.org/Function_Reference/add_custom_image_header
|
||||||
|
if (!defined('HEADER_TEXTCOLOR')) { define('HEADER_TEXTCOLOR', ''); }
|
||||||
|
if (!defined('NO_HEADER_TEXT')) { define('NO_HEADER_TEXT', true); }
|
||||||
|
if (!defined('HEADER_IMAGE')) { define('HEADER_IMAGE', get_template_directory_uri() . '/img/logo.png'); }
|
||||||
|
if (!defined('HEADER_IMAGE_WIDTH')) { define('HEADER_IMAGE_WIDTH', 300); }
|
||||||
|
if (!defined('HEADER_IMAGE_HEIGHT')) { define('HEADER_IMAGE_HEIGHT', 75); }
|
||||||
|
|
||||||
|
function roots_custom_image_header_site() { }
|
||||||
|
function roots_custom_image_header_admin() { ?>
|
||||||
|
<style type="text/css">
|
||||||
|
.appearance_page_custom-header #headimg { min-height: 0; }
|
||||||
|
</style>
|
||||||
|
<?php }
|
||||||
|
add_custom_image_header('roots_custom_image_header_site', 'roots_custom_image_header_admin');
|
||||||
|
|
||||||
add_theme_support('menus');
|
add_theme_support('menus');
|
||||||
register_nav_menus(array(
|
register_nav_menus(array(
|
||||||
'primary_navigation' => __('Primary Navigation', 'roots'),
|
'primary_navigation' => __('Primary Navigation', 'roots'),
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<a id="logo" href="<?php echo home_url(); ?>/">
|
<a id="logo" href="<?php echo home_url(); ?>/">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" width="300" height="75" alt="<?php bloginfo('name'); ?>">
|
<img src="<?php echo get_header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php bloginfo('name'); ?>">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<?php if ($roots_options['clean_menu']) { ?>
|
<?php if ($roots_options['clean_menu']) { ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user