Title: where does this code come from??
Last modified: June 26, 2018

---

# where does this code come from??

 *  Resolved [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/where-does-this-code-come-from/)
 * been checking out Gutenberg and one of the themes described on themeshaper.com.
   a recent article introduced us to 3 “gutenberg” themes, one of theme being a 
   theme called handicraft.
    This is a link to that article “[Styling Themes for Gutenberg](https://themeshaper.com/2018/02/15/styling-themes-for-gutenberg/)“`
 * this might be more of a general wordpress question than gutenberg related but
   it does relate to using the theme handicraft. how does the internal css get generated
   in the head of this theme which displays the background image on the page?
 * This the CSS code generated just before the end of the head, where from??
 *     ```
       <style type="text/css" id="custom-background-css">
       body.custom-background {background-image: url("images/papertexture.jpg"); 
       background-position: left top; 
       background-size: auto; 
       background-repeat: repeat; 
       background-attachment: scroll;}
       </style>
       ```
   
 * Al
    -  This topic was modified 7 years, 11 months ago by [almcr](https://wordpress.org/support/users/almcr/).
    -  This topic was modified 7 years, 11 months ago by [almcr](https://wordpress.org/support/users/almcr/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [jamieschmid](https://wordpress.org/support/users/jamieschmid/)
 * (@jamieschmid)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/where-does-this-code-come-from/#post-10438343)
 * In general, CSS in the head of your HTML will be put there by either a plugin
   or theme, by hooking into the [wp_head() action hook](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head).
   As to where the CSS is being SET, that could be many places: the Customizer, 
   plugin settings, separate theme settings, etc. Currently, Gutenberg block styling(
   even for shared blocks) is added as inline CSS on the exact element you are styling
   so what you are seeing probably isn’t an output from Gutenberg.
 *  Thread Starter [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/where-does-this-code-come-from/#post-10438387)
 *     ```
       // Set up the WordPress core custom background feature.
       add_theme_support( 'custom-background', apply_filters( 'handicraft_custom_background_args', array(
       'default-color' => 'ffffff',
       'default-image' => get_template_directory_uri() . '/assets/images/papertexture.jpg',
       ) ) );
       ```
   
 * this is code from the theme handicraft functions.php file and is used to generate
   that css. didn’t realize this is what that did. this mystery solved, I am just
   a dabbler in wordpress, certainly not a professional, and like poking around 
   and playing in the wordpress world.
 * thanks Al

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘where does this code come from??’ is closed to new replies.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

## Tags

 * [Action hooks](https://wordpress.org/support/topic-tag/action-hooks/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [header css](https://wordpress.org/support/topic-tag/header-css/)
 * [wp_head](https://wordpress.org/support/topic-tag/wp_head/)

 * 2 replies
 * 2 participants
 * Last reply from: [almcr](https://wordpress.org/support/users/almcr/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/where-does-this-code-come-from/#post-10438387)
 * Status: resolved