Support

Home Forums Event Espresso Premium Child Theme

Child Theme

Posted: January 26, 2017 at 10:27 am

Viewing 2 reply threads


rhj4

January 26, 2017 at 10:27 am

I am trying to create a child theme for Iced Mocha but my child is not picking up the parent (iced-mocha-master) theme’s style. Here is my style.css:

/*
 Theme Name:   Iced Mocha Child
 Theme URI:    http://connexions.world/iced-mocha-child/
 Description:  Iced Mocha Child Theme
 Author:       Bob Jones
 Author URI:   http://rhj4.com
 Template:     iced-mocha-master
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  iced-mocha-child
*/

And here is my functions.php:

<?php
function enqueue_parent_styles() {
	wp_enqueue_style('parent-style',get_template_directory_uri().'/style.css');
}
?>

Why is it not picking up the iced-mocha-master theme’s style?


Josh

  • Support Staff

January 26, 2017 at 10:53 am

Hi Bob,

The reason it’s not working is because the function isn’t being called. You’ll need to add this to your functions.php file:

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );


rhj4

January 26, 2017 at 1:49 pm

Thanks Josh. I did that before, but now, finally it works… mostly. I have lost the custom image at the top of my page, but that may be simple to fix. Now to my next post… custom page templates.

Bob

Viewing 2 reply threads

The support post ‘Child Theme’ 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.

Event Espresso