Posted: December 19, 2016 at 1:39 pm
|
A good number of your recommendations require modification of functions.php. In order to do this right, it appears that implementing a child theme is an appropriate first step, but I am having trouble getting mine working. I am not seeing any diagnostics, but when it comes up, it has lost much of the styling. My functions.php file contains this code: add_action( ‘wp_enqueue_scripts’, ‘iced_mocha_theme_enqueue_styles’ ); $parent_style = ‘iced-mocha-master-style’; // This is ‘twentyfifteen-style’ for the Twenty Fifteen theme.
The child theme name is ‘iced-mocha-child’ and it is in the same folder as the iced-mocha-master. The iced-mocha-child theme does appear in my themes list, but when I activate it, the background goes to black. Can you point me in the right direction here? Thanks! |
Hi Bob, One step you may have missed is the child theme folder needs its own style.css file. There’s further directions in this codex article: https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme |
|
|
Josh, I read that article and created the style.css and functions.php files. Here is the content of my style.css: /* |
Hi Bob, Unless you’re actually modifying theme files other than functions.php, setting up a child theme is unnecessary. In most cases, it’s best to add custom functions to a custom functions plugin. |
|
|
Thanks for that reminder. It seems to work pretty well. |
The support post ‘Getting Child Theme Working’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.