{"id":1180,"date":"2020-03-26T12:34:36","date_gmt":"2020-03-26T12:34:36","guid":{"rendered":"https:\/\/www.getbowtied.com\/?post_type=helpkit&p=1180"},"modified":"2020-03-26T12:35:35","modified_gmt":"2020-03-26T12:35:35","slug":"error-child-theme-not-loading-custom-style","status":"publish","type":"helpkit","link":"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/","title":{"rendered":"Error: Child Theme not loading custom style"},"content":{"rendered":"\n

If you’re using a child theme and after updating The Hanger to 1.6.2, the custom styles in the child are no longer loaded, please update the functions.php<\/em> file. The enqueue function from\u00a0functions.php<\/em>\u00a0was modified to correctly enqueue the parent and the child css files, as said in the\u00a0WP Theme Child Handbook<\/a>. So:<\/p>\n\n\n\n

add_action( 'wp_enqueue_scripts', 'thehanger_enqueue_styles', 100 );
\nfunction thehanger_enqueue_styles() {
\n wp_enqueue_style( 'getbowtied-child-styles', get_stylesheet_directory_uri() . '\/style.css', array( 'getbowtied-styles' ), wp_get_theme()->get('Version') );
\n}<\/pre>\n\n\n\n

to be replaced with\u00a0<\/p>\n\n\n\n

add_action( 'wp_enqueue_scripts', 'thehanger_enqueue_styles', 99 );
function thehanger_enqueue_styles() {
    \/\/ enqueue parent styles
    wp_enqueue_style( 'thehanger-styles', get_template_directory_uri() . '\/css\/styles.css' );
    \/\/ enqueue child styles
    wp_enqueue_style( 'thehanger-child-styles',
        get_stylesheet_directory_uri() . '\/style.css',
        array( 'thehanger-styles' ),
        wp_get_theme()->get('Version')
    );
}
<\/pre>\n\n\n\n

That should do it.<\/p>\n","protected":false},"excerpt":{"rendered":"

If you’re using a child theme and after updating The Hanger to 1.6.2, the custom styles in the child are no longer loaded, please update the functions.php file. The enqueue function from\u00a0functions.php\u00a0was modified to correctly enqueue the parent and the child css files, as said in the\u00a0WP Theme Child Handbook. So: add_action( ‘wp_enqueue_scripts’, ‘thehanger_enqueue_styles’, 100\u2026<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","helpkit-category":[145],"helpkit-tag":[],"yoast_head":"\nError: Child Theme not loading custom style - Get Bowtied<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Error: Child Theme not loading custom style - Get Bowtied\" \/>\n<meta property=\"og:description\" content=\"If you’re using a child theme and after updating The Hanger to 1.6.2, the custom styles in the child are no longer loaded, please update the functions.php file. The enqueue function from\u00a0functions.php\u00a0was modified to correctly enqueue the parent and the child css files, as said in the\u00a0WP Theme Child Handbook. So: add_action( 'wp_enqueue_scripts', 'thehanger_enqueue_styles', 100\u2026\" \/>\n<meta property=\"og:url\" content=\"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/\" \/>\n<meta property=\"og:site_name\" content=\"Get Bowtied\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GetBowtied\/\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-26T12:35:35+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@getbowtied\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/\",\"url\":\"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/\",\"name\":\"Error: Child Theme not loading custom style - Get Bowtied\",\"isPartOf\":{\"@id\":\"https:\/\/getbowtied.com\/#website\"},\"datePublished\":\"2020-03-26T12:34:36+00:00\",\"dateModified\":\"2020-03-26T12:35:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/getbowtied.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help Articles\",\"item\":\"https:\/\/getbowtied.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Error: Child Theme not loading custom style\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/getbowtied.com\/#website\",\"url\":\"https:\/\/getbowtied.com\/\",\"name\":\"Get Bowtied\",\"description\":\"Hassle-free themes, plugins & support for WordPress and WooCommerce\",\"publisher\":{\"@id\":\"https:\/\/getbowtied.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/getbowtied.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/getbowtied.com\/#organization\",\"name\":\"Get Bowtied\",\"url\":\"https:\/\/getbowtied.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/getbowtied.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.getbowtied.com\/wp-content\/uploads\/2020\/02\/getbowtied-logo-alt.png\",\"contentUrl\":\"https:\/\/www.getbowtied.com\/wp-content\/uploads\/2020\/02\/getbowtied-logo-alt.png\",\"width\":512,\"height\":512,\"caption\":\"Get Bowtied\"},\"image\":{\"@id\":\"https:\/\/getbowtied.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/GetBowtied\/\",\"https:\/\/x.com\/getbowtied\",\"https:\/\/www.instagram.com\/getbowtied\/\",\"https:\/\/www.linkedin.com\/company\/get-bowtied\",\"https:\/\/pinterest.com\/getbowtied\/\",\"https:\/\/www.youtube.com\/c\/Getbowtied\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Error: Child Theme not loading custom style - Get Bowtied","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/","og_locale":"en_US","og_type":"article","og_title":"Error: Child Theme not loading custom style - Get Bowtied","og_description":"If you’re using a child theme and after updating The Hanger to 1.6.2, the custom styles in the child are no longer loaded, please update the functions.php file. The enqueue function from\u00a0functions.php\u00a0was modified to correctly enqueue the parent and the child css files, as said in the\u00a0WP Theme Child Handbook. So: add_action( 'wp_enqueue_scripts', 'thehanger_enqueue_styles', 100\u2026","og_url":"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/","og_site_name":"Get Bowtied","article_publisher":"https:\/\/www.facebook.com\/GetBowtied\/","article_modified_time":"2020-03-26T12:35:35+00:00","twitter_card":"summary_large_image","twitter_site":"@getbowtied","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/","url":"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/","name":"Error: Child Theme not loading custom style - Get Bowtied","isPartOf":{"@id":"https:\/\/getbowtied.com\/#website"},"datePublished":"2020-03-26T12:34:36+00:00","dateModified":"2020-03-26T12:35:35+00:00","breadcrumb":{"@id":"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/getbowtied.com\/documentation\/the-hanger\/customization-the-hanger\/error-child-theme-not-loading-custom-style\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/getbowtied.com\/"},{"@type":"ListItem","position":2,"name":"Help Articles","item":"https:\/\/getbowtied.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"Error: Child Theme not loading custom style"}]},{"@type":"WebSite","@id":"https:\/\/getbowtied.com\/#website","url":"https:\/\/getbowtied.com\/","name":"Get Bowtied","description":"Hassle-free themes, plugins & support for WordPress and WooCommerce","publisher":{"@id":"https:\/\/getbowtied.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/getbowtied.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/getbowtied.com\/#organization","name":"Get Bowtied","url":"https:\/\/getbowtied.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/getbowtied.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.getbowtied.com\/wp-content\/uploads\/2020\/02\/getbowtied-logo-alt.png","contentUrl":"https:\/\/www.getbowtied.com\/wp-content\/uploads\/2020\/02\/getbowtied-logo-alt.png","width":512,"height":512,"caption":"Get Bowtied"},"image":{"@id":"https:\/\/getbowtied.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GetBowtied\/","https:\/\/x.com\/getbowtied","https:\/\/www.instagram.com\/getbowtied\/","https:\/\/www.linkedin.com\/company\/get-bowtied","https:\/\/pinterest.com\/getbowtied\/","https:\/\/www.youtube.com\/c\/Getbowtied"]}]}},"_links":{"self":[{"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/helpkit\/1180"}],"collection":[{"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/helpkit"}],"about":[{"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/types\/helpkit"}],"author":[{"embeddable":true,"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/comments?post=1180"}],"version-history":[{"count":0,"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/helpkit\/1180\/revisions"}],"wp:attachment":[{"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/media?parent=1180"}],"wp:term":[{"taxonomy":"helpkit-category","embeddable":true,"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/helpkit-category?post=1180"},{"taxonomy":"helpkit-tag","embeddable":true,"href":"https:\/\/getbowtied.com\/wp-json\/wp\/v2\/helpkit-tag?post=1180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}