From f7ee5a55b615a0425947c77ec01005c1d6823c96 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 23 Oct 2015 14:06:35 -0400 Subject: [PATCH] Update the theme to add theme support for custom backgrounds https://codex.wordpress.org/Custom_Backgrounds --- functions.php | 15 +++++++++++++-- header.php | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index cd6b562..57ef991 100644 --- a/functions.php +++ b/functions.php @@ -95,7 +95,7 @@ function glm_page_menu($parent = 0, $class = '', $subnav = false, $navImg = null ++$elemCount; } echo ''."\n"; - + } function SearchFilter($query) { @@ -135,7 +135,18 @@ function glm_offcanvas_menu() //)); } -add_theme_support('post-thumbnails'); +add_theme_support('post-thumbnails','custom-background'); +$defaults = array( + 'default-color' => '', + 'default-image' => '', + 'default-repeat' => '', + 'default-position-x' => '', + 'default-attachment' => '', + 'wp-head-callback' => '_custom_background_cb', + 'admin-head-callback' => '', + 'admin-preview-callback' => '' +); +add_theme_support( 'custom-background', $defaults ); set_post_thumbnail_size(120, 100, true); /** * glm_site_scripts diff --git a/header.php b/header.php index f5949fc..b468350 100644 --- a/header.php +++ b/header.php @@ -8,7 +8,7 @@ - + >
-- 2.17.1