Update the theme to add theme support for custom backgrounds
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 23 Oct 2015 18:06:35 +0000 (14:06 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 23 Oct 2015 18:06:35 +0000 (14:06 -0400)
https://codex.wordpress.org/Custom_Backgrounds

functions.php
header.php

index cd6b562..57ef991 100644 (file)
@@ -95,7 +95,7 @@ function glm_page_menu($parent = 0, $class = '', $subnav = false, $navImg = null
         ++$elemCount;
     }
     echo '</ul><!-- end -->'."\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
index f5949fc..b468350 100644 (file)
@@ -8,7 +8,7 @@
     <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
     <?php wp_head(); ?>
   </head>
-  <body>
+      <body <?php body_class();?>>
       <div class="off-canvas-wrap" data-offcanvas>
         <div class="inner-wrap">
             <div class="shadow-wrapper">