私は2つのファイルを作成しました:themeforestでNewspaperテーマの子テーマを作成するにはどうすればよいですか?
style.css
functions.php
はどちらzip圧縮フォルダNewspaper-child
です。
style.css
:
Theme Name: Newspaper Child
Template: Newspaper
*/
functions.php
:私は子供のテーマを使用する場合
<?php
add_action('wp_enqueue_scripts', 'my_theme_enqueue_styles');
function my_theme_enqueue_styles() {
$parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
wp_enqueue_style($parent_style, get_template_directory_uri() . '/style.css');
wp_enqueue_style('child-style',
get_stylesheet_directory_uri() . '/style.css',
array($parent_style),
wp_get_theme()->get('Version')
);
}
?>
それは完全に私のウェブサイトをめちゃくちゃれます。
以下の回答を確認してください。今はいいですか? – Ashnah
私の答えにあるコードを使用してください。 –