Child Theme

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #639
    andersra88
    Member

    Would you mind providing a quick guide to creating a child theme?

    I created a css theme referencing your style.css, but still seeing errors in the chrome console.

    Thanks.

    #643
    livemesh
    Keymaster

    Here are the steps –

    1) Create a directory named like \enigmatic-child under wp-content\themes\ folder. Create style.css file with contents like below –

    /*
    Theme Name:     Enigmatic Child
    Theme URI:      https://www.livemeshthemes.com/enigmatic
    Description:    Child theme for the Enigmatic Theme by LiveMesh
    Author:         LiveMesh
    Author URI:     http://themeforest.net/user/livemesh
    Template:       enigmatic
    Version:        0.1.0
    */
    
    @import url("../enigmatic/style.css");
    

    2) Create a functions.php file in the \enigmatic-child folder with contents that look like below –

    get_theme_layouts_strings() as $layout) {
            // do something with $layout variable;
        }
        mo_get_theme_option('mo_theme_layout'); // can access options from parent theme
    }
    
    ?>
    

    3) Next create template files like single.php, archive.php etc. if you need to override the ones defined in the parent theme – Enigmatic.

    I tested the whole setup and everything works except for skins. The culprit is the code below that has sneaked into the theme –

    $skin_stylesheet_dir_uri = get_stylesheet_directory_uri() . '/css/skins/';
    

    in line 649 of file <enigmatic theme dir>/framework/framework.php. Replace this with

    $skin_stylesheet_dir_uri = get_template_directory_uri() . '/css/skins/';
    

    This is a bug which will get fixed in the next update and hence for now, pls change this file and things should work without errors for you as tested by me on several pages. Do let me know if you still see issues.

    P.S. – If you are not going to make massive changes, you can make use of custom.css and custom-functions.php files in the directory /custom for making custom changes. Just preserve these files before updating the theme and replace the ones included with the theme since I usually keep them blank for ready replacement. You can also insert changes into Custom CSS tab in theme options panel for any small styling changes you would like to make. Hope this helps.

    #645
    Ryan
    Guest

    Thanks a bunch! Saved me quite a bit of time 🙂

    #662
    Ryan
    Guest

    It looks like there is a mistake in your functions.php?

    It prints this out at the top of my pages:

    Default
    Full Width
    Two Columns – Right Sidebar
    Two Columns – Left Sidebar
    Three Columns – Right Sidebar
    Three Columns – Left Sidebar
    Three Columns – Sidebar Both Sides
    Stretched

    #664
    livemesh
    Keymaster

    I was just giving you an example of how to use the functions in the parent theme or rather prove that the child theme is working well. Pls delete those lines from the child theme and fill with whatever changes you would like to make. Sorry – I should have clarified this before.

    I modified my reply earlier with functions.php template to prevent these being printed. Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Enigmatic Theme Support’ is closed to new topics and replies.