Support » Theme: Twenty8teen » Дочерняя тема twenty8teen

  • Resolved abiturient

    (@abiturient)


    Пожалуйста расскажите подробно, как создать дочернюю тему twenty8teen
    Я пробовал создать дочернюю тему как обычно: создал папку twenty8teen-child, в style.css прописал:
    /*!
    Theme Name: Twenty8teenChild
    Description: A subsidiary theme for the theme twenty8teen
    Author:
    Template: twenty8teen
    Version: 0.1
    */
    @import url(“../twenty8teen/style.css”);

    Но сайт не работает.

    • This topic was modified 2 years, 7 months ago by abiturient.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter abiturient

    (@abiturient)

    Я допустил ошибку, загрузив в Twenty8teenChild полный файл functions.php из twenty8teen

    Theme Author Joy

    (@joyously)

    I’m glad you got it figured out. (I never saw the notification for this support topic.)

    But if you use @import like that, you will get the twenty8teen styles twice. You don’t need to load the parent styles or the child styles. They are loaded for you.

    Thread Starter abiturient

    (@abiturient)

    Для подключения дочерних стилей я использую

    add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' );
    function my_child_theme_scripts() {
    	wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }

    @import – очень медленно.

    Жалко что приходится общаться через translate. Я хотел бы понять идею папки Cild-demo.
    Мне надо учить английский

    • This reply was modified 2 years, 7 months ago by abiturient.
    Theme Author Joy

    (@joyously)

    To connect child styles, I use

    add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' );
    function my_child_theme_scripts() {
    	wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }

    @import – very slow
    It’s a pity that I have to communicate through translate. I would like to understand the idea of the Child-demo folder.
    I need to learn English

    For this theme, you do not need to load any styles in the child theme. The parent theme will load them for you. By using the above code, you are loading the parent style twice.
    The child-demo is provided to show you how easy it is to make a child theme. You can copy the folder to the wp-content/themes folder and activate it.
    You can also make a child theme by having a folder with only a style.css file that contains the standard comment. No styles needed, and no functions.php needed.
    I put some comments into the child-demo style.css and functions.php, so maybe that will help explain.

    I don’t read Russian, so I have to use translate also.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Дочерняя тема twenty8teen’ is closed to new replies.