child theme of Shapely is very slightly different

I created a child theme of Shapely as commonly advised. On activating the new theme everything is almost exactly the same, but not quite: it hasn’t picked up the fonts for the various text elements. Also the square-cornered buttons have become rounded. See the two small screenshots attached.

What’s up? What have I missed?

To load the parent’s style sheet, rather than use
@import url("…/shapely/style.css");
(which apparently is now deprecated), I used

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}

at the start of the php in the child’s functions.php file.

I’m puzzled as to how these small changes have occurred. Any advice much appreciated.

Hi @beemerbiker,

I hope you are well today and thank you for your question.

Could you please share me your child theme so that i can troubleshoot it on my test site?

Also make sure you have not mistakenly added any custom CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Appearance -> Customize -> Shapely Options -> Other

Kind Regards,
Movin

Hi, thanks for getting back to me. However, I’ve just solved the problem. I found another post in the forum that i had previously missed. The code in functions.php needed a few more lines than for a standard theme. This works:

add_action( 'wp_enqueue_scripts', 'func_enqueue_child_styles', 99);
function func_enqueue_child_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_dequeue_style('shapely-style');
    wp_enqueue_style( 'shapely-style',
        get_stylesheet_directory_uri() . '/style.css',
        array('parent-style')
    );
}

I’m not quite sure what it does, but all is fine now.

Thanks.

You are most welcome here :slight_smile: