Resolved

Child Theme issue

Polestar Theme started by Barbara Day Oct 3, 2017 3 replies
Barbara Day Oct 3, 2017 · 6:41 pm #7939

Hi,

Have tried following the instructions here: https://purothemes.com/documentation/general-wordpress/creating-child-theme/ but am not able to get the child theme CSS to apply.

So I tried modifying the enque styles script in functions.php to

<?php
add_action( 'wp_enqueue_scripts', 'polestar_enqueue_styles' );
function polestar_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri(). '/style.css' );

}

but no luck with that either. Does the Polestar child theme need to be built differently than for other themes?

The site is: http://fbsflex.dayswork.org

Hope you can help.

Thanks

Andrew Misplon Puro Oct 3, 2017 · 6:51 pm #7940

Hi Barbara

Thanks for posting.

You can download a child theme for Polestar here: https://purothemes.com/documentation/polestar-wordpress-theme/child-theme-library/#heading-starter

Your current child theme is working though. If a CSS rule isn’t taking effect, it doesn’t necessarily mean the issue is with the child theme. Your child style.css file is being loaded. You can view that in your page source:

<link rel="stylesheet" id="child-style-css" href="http://fbsflex.dayswork.org/wp-content/themes/polestar-child2/style.css?ver=4.8.2" type="text/css" media="all">

Most likely your rule isn’t taking effect because of CSS specificity or a similar issue. Which rule do you need a hand with?

Barbara Day Oct 3, 2017 · 7:30 pm #7941

Please disregard, I was able to make the child theme work with the Puro instructions on the second try.

Thanks.

Andrew Misplon Puro Oct 3, 2017 · 7:33 pm #7942

Awesome 🙂 Glad to hear you’ve made progress. Thanks for the update.

4 posts