I decided to make a child theme based on the theme of indreams. Took all the first steps to create a child theme:

  1. Created a folder with the name of the child theme "indreams-child".
  2. 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.

  • Are all the links spelled correctly and the necessary files podgrazhatsya You can see in FireBug or another otlaochnaya console that there are no 404th errors. - newman

1 answer 1

The mistake was that I incorrectly named the functions.php file! Function.php instead of functions.php

Thanks for the comment, newman !