Having trouble setting up child theme
-
I’m following wordpress codex and trying to set up a child theme. I created functions.php and put the following code:
<?php add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX); function enqueue_child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style') ); }My child theme’s stylesheet has the following:
/* Theme Name: mythemename-child Template: mythemename */ /* =Theme customization starts here -------------------------------------------------------------- */I’m trying to overwrite some basic stuff like H1 and H2 font sizes but nothing I put into style.css seems to work. Do I need to edit something in the functions.php to include my actual theme name? I’m not a programmer and I can’t tell if I’m supposed to insert the actual name of my theme somewhere in the code where it says “enqueue_child_theme_styles”, etc.
I literally copy and pasted the functions.php code from the wordpress codex site and didn’t change anything.
The topic ‘Having trouble setting up child theme’ is closed to new replies.