0

I made a child theme as follows: 1. create a directory name: child 2. add a .css file inside this directory and the following content:

/*
 Theme Name:   Hestia
 Description:  Hestia Child Theme
 Author:       Abdus Sattar
 Template:     hestia
 Version:      1.0.0
 Text Domain:  hestia-child
*/
  1. Add another file title: functions.php and put the following content:

enter image description here

  1. Now I activate the child theme. Successfully activated but some design has been broken. I just copy paste the code from wordpress codex and it should work. But can't figure out which step I missed. Any idea?

closed as off-topic by Jacob Peattie, Krzysiek Dróżdż, Michael, bosco, Howdy_McGee Jun 3 '18 at 5:53

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

It seems like all the css files are not laoding, you can check what's not loading the source code and add that or simply replace your functions.php with the following code for Hestia theme.

<?php
if ( !defined( 'ABSPATH' ) ) exit;

if ( !function_exists( 'hestia_child_parent_css' ) ):
    function hestia_child_parent_css() {
        wp_enqueue_style( 'hestia_child_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap' ) );
    if( is_rtl() ) {
        wp_enqueue_style( 'hestia_child_parent_rtl', trailingslashit( get_template_directory_uri() ) . 'style-rtl.css', array( 'bootstrap' ) );
    }

    }
endif;
add_action( 'wp_enqueue_scripts', 'hestia_child_parent_css', 10 );

/**
 * Import options from the parent theme
 *
 * @since 1.0.0
 */
function hestia_child_get_parent_options() {
    $hestia_mods = get_option( 'theme_mods_hestia' );
    if ( ! empty( $hestia_mods ) ) {
        foreach ( $hestia_mods as $hestia_mod_k => $hestia_mod_v ) {
            set_theme_mod( $hestia_mod_k, $hestia_mod_v );
        }
    }
}
add_action( 'after_switch_theme', 'hestia_child_get_parent_options' );

Source for the snippet: How to create a Child theme for Hestia

Not the answer you're looking for? Browse other questions tagged or ask your own question.