Quantcast
Channel: Topic Tag: error 500 | WordPress.org
Viewing all articles
Browse latest Browse all 1704

Unicornflakes on "Child theme activation resulted in error 500"

$
0
0

I'm using the Hemingway theme and I just created a child theme. I activated the theme but got "Internal error 500". Please help!

I followed these instructions: https://codex.wordpress.org/Child_Themes

This is the CSS heading:

/*
 Theme Name:   Hemingway Child
 Theme URI:    http://www.andersnoren.se/teman/hemingway-wordpress-theme/
 Description:  Hemingway Child Theme
 Author:       Anders Norén
 Author URI:   http://www.andersnoren.com
 Template:     hemingway
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  hemingway-child
*/

@import url("../hemingway/style.css");

And this is the functions.php file heading:

<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

function theme_enqueue_styles() {

    $parent_style = 'parent-style';

    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 )
    );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
?>

Have I written something wrong in the code? I'm new to php.

Now I cannot even get into my dahboard and deactivate the child theme.

What on earth do I do now? I want to have an active child theme and be able to customize it!


Viewing all articles
Browse latest Browse all 1704

Trending Articles