Support Forums for LiveMesh Themes & Plugins › Forums › Enigmatic Theme Support › Child Theme
Tagged: Child Theme
- This topic has 4 replies, 3 voices, and was last updated 11 years, 9 months ago by
livemesh.
-
AuthorPosts
-
May 4, 2013 at 10:31 pm #639
andersra88
MemberWould 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.
May 6, 2013 at 4:46 pm #643livemesh
KeymasterHere 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.
May 6, 2013 at 5:00 pm #645Ryan
GuestThanks a bunch! Saved me quite a bit of time 🙂
May 8, 2013 at 12:04 am #662Ryan
GuestIt 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
StretchedMay 8, 2013 at 3:57 am #664livemesh
KeymasterI 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
-
AuthorPosts
- The forum ‘Enigmatic Theme Support’ is closed to new topics and replies.