I decided to make a child theme based on the theme of indreams. Took all the first steps to create a child theme:
- Created a folder with the name of the child theme "indreams-child".
It added a style.css file with the following content:
/* Theme Name: ΠΠΎΡΠ΅ΡΠ½ΡΡ ΡΠ΅ΠΌΠ° indreams Template: indreams */ // ΠΈΠΌΠΏΠΎΡΡΠΈΡΡΠ΅ΠΌ ΡΡΠΈΠ»ΠΈ ΡΠΎΠ΄ΠΈΡΠ΅Π»ΡΡΠΊΠΎΠΉ ΡΠ΅ΠΌΡ @import url("../indreams/style.css"); // Π‘Π²ΠΎΠΈ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΡΡΠΈΠ»ΠΈ .foo{ color:red; }
The theme, according to the idea should already work. But when I activate it and open it, the layout flies! I read in one of the articles on the Internet that you need to create a function.php file in the same folder and include parental styles in it. I did it like this:
function indreams_child_enqueue_styles() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); wp_enqueue_style( 'indreams-Arvo', indreams_font_url(), array(), null ); wp_enqueue_style('indreams-flexslider-css', get_template_directory_uri() . '/css/flexslider.css'); wp_enqueue_style('indreams-font-awesome-css', get_template_directory_uri() . '/css/font-awesome.css'); wp_enqueue_style('indreams-bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css'); wp_enqueue_style('indreams-superfish-css', get_template_directory_uri() . '/css/superfish.css'); wp_enqueue_style('indreams-animate-css', get_template_directory_uri() . '/css/animate.css'); wp_enqueue_style('indreams-prettyPhoto-css', get_template_directory_uri() . '/css/prettyPhoto.css'); wp_enqueue_style('indreams-meanmenu-css', get_template_directory_uri() . '/css/meanmenu.css'); } add_action( 'wp_enqueue_scripts', 'indreams_child_enqueue_styles' );
Nothing works again. Please, help. Tell me what the problem is
Note: Exactly the same problem in other topics. The problem disappears when I copy the head tag generated in the parent theme into my child.