Warning when creating child theme
-
Hi
Tried making a cild theme but now I ge the following errormessage:
Warning: Cannot modify header information – headers already sent by (output started at /var/www/svenskdansk.nu/public_html/wp-content/themes/twentyseventeen-child/functions.php:1) in /var/www/svenskdansk.nu/public_html/wp-admin/includes/misc.php on line 1126
Here is my code:
style.css:/*
Theme Name: Twenty Seventeen Child
Theme URI: https://svenskdansk.nu
Description: Twenty Seventeen Child Theme
Author: Elin Bruun
Author URI: https://svenskdansk.nu
Template: twentyseventeen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-seventeen-child
*/styles.php
<?php
add_action( ‘wp_enqueue_scripts’, ‘load_parent_styles_when_child_active’ );
function load_parent_styles_when_child_active() {
if ( is_child_theme() ) {
wp_enqueue_style( ‘parent-style’, trailingslashit( get_template_directory_uri() ) . ‘style.css’ );
}}
What shoul i do?
best regars Elin
The page I need help with: [log in to see the link]
- The topic ‘Warning when creating child theme’ is closed to new replies.