Browse Source

Load header image from (fix #104)

pull/107/head
Ned Zimmerman 7 years ago
parent
commit
826dc93086
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 6
      header.php
  2. 2
      inc/actions/namespace.php

6
header.php

@ -44,7 +44,11 @@
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'pressbooks-aldine' ); ?></a> <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'pressbooks-aldine' ); ?></a>
<header class="header" role="banner" style="background-image: url(<?php <header class="header" role="banner" style="background-image: url(<?php
if ( is_front_page() ) { if ( is_front_page() ) {
echo( get_header_image() ); if ( has_header_image() ) {
echo( get_header_image() );
} else {
echo get_template_directory_uri() . '/dist/images/header.jpg';
}
} else { } else {
echo get_template_directory_uri() . '/dist/images/catalog-header.jpg'; echo get_template_directory_uri() . '/dist/images/catalog-header.jpg';
} ?>);"> } ?>);">

2
inc/actions/namespace.php

@ -63,7 +63,7 @@ function setup() {
// Set up the WordPress core custom header feature. // Set up the WordPress core custom header feature.
add_theme_support( 'custom-header', [ add_theme_support( 'custom-header', [
'default-image' => $assets->getPath( 'images/header.jpg' ), 'default-image' => get_template_directory_uri() . '/dist/images/header.jpg',
'width' => 1920, 'width' => 1920,
'height' => 884, 'height' => 884,
'default-text-color' => '#000', 'default-text-color' => '#000',

Loading…
Cancel
Save