child theme
-
Hi,
great theme. Is there any tips how to create child theme?
Regards
-
Thanks π
This should help to Make a child theme
Thanks but it did not help. After I activate child theme site is little crushed.
hmmm odd…try my setup tutorial for a child theme and see if that helps.
Still something wrong, here: http://zdolnelapy.pl/projekty/moto-s/
Your style.css for the child theme looks right. Did you create a functions.php file in your child theme? This will inherit the parent theme “seasonal” style.css which is the element that is missing from your current site.
In my tutorial, there’s a section in the page with a heading “Functions” that goes through this process.
Yes I did,
<?php /** * Functions and definitions * @package Seasonal Child */ // Lets begin by grabbing our stylesheet from the parent theme add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { // Load our main stylesheet wp_enqueue_style( 'seasonal-child-parent-css', get_template_directory_uri() . '/style.css' ); } ?>I just used yours in my local test site and it works, so why it’s not loading the parent’s stylesheet (which is what is missing) is puzzling me.
Try this one:
<?php /** * Functions and definitions * @package Seasonal Child */ // Lets begin by grabbing our stylesheet from the parent theme add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'seasonal-style', get_stylesheet_uri() ); wp_enqueue_style( 'seasonal-child-parent-css', get_template_directory_uri() . '/style.css' ); } ?>Just to confirm before you try my last reply, this in your functions.php does not work?
<?php /** * Functions and definitions * @package Seasonal Child */ // Lets begin by grabbing our stylesheet from the parent theme add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } ?>I am sorry. It is my mistake. I called file function.php not functions.php that is why it did not work.. Really sorry about that
No need to say sorry π
…So which code in your functions file are you now using?<?php /** * Functions and definitions * @package Seasonal Child */ // Lets begin by grabbing our stylesheet from the parent theme add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } ?>
The topic ‘child theme’ is closed to new replies.
