0

I have just created my first child theme using ThemeGrill's Flash Pro as the parent. I followed the directions from ThemeGrill exactly to create the theme, even downloading the code from their site to populate the functions.php and style.css files in my child theme. After I created the theme it is visible under the theme options for the site I am working on but the theme is blank. When I attempt a live preview nothing is visible. I thought maybe that was just a quirk with the Live Preview so I Activated the theme. Once I did that the entire site went down and I had to hack the DB and update the wp-contents table to switch back to the standard Flash Pro theme.

I have reached out to ThemeGrill to see what their suggestions are but the can only help if they have access to the site. Currently I am running all of this on an internal dev server so providing them access is not optimal. I can do that but want to keep it as a last resort.

I am running wordpress 5.1.1 multisite on a bitnami image. Here is my code for both the functions.php and stlye.css files.

/*
Theme Name: Flash Pro Pioneer Graphics
Theme URI: http://themegrill.com/themes/flash/
Description: Pioneer Graphics Child Theme for Flash Pro
Author: ThemeGrill
Author URI: http://themegrill.com
Template: flash-pro
Version: 1.0
*/

/* =Theme customization starts here
------------------------------------------------------- */

<?php
/**
* Child theme functions file goes here
*/
function flash-pro_pioneergraphics_enqueue_styles() {

$parent_style = 'flash-style'; // Parent theme style handle 'flash-style'.

// Enqueue parent and child theme style.css
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'flash-pro_pioneergraphics-style',
    get_stylesheet_directory_uri() . '/style.css',
    array( $parent_style ),
    wp_get_theme()->get( 'Version' )
);
}

add_action( 'wp_enqueue_scripts', 'flash-pro_pioneergraphics_enqueue_styles' );

I have confirmed the directory and file permissions for the new child theme and files are the same as the parent directory and files. I have also searched StackExchange and tried to use solutions from other posts but nothing is working.

What am I doing wrong?

  • Strip it down to bare essentials: for your child theme, create only a style.css file and only put a comment in that file: /* Theme Name: Child theme Template: flash-pro */ - this will tell WordPress it's a child theme and what parent to reference. Now activate it and you should see your site as usual, with no changes. From there make one small change at a time so you can identify which part is going wrong. – WebElaine May 2 at 19:41
  • 1
    this was a good exercise and found the problem. the function name i had in the functions.php file had a dash '-' in the name. i replaced that with and underscore '_' and it is working fine now. – gacto May 6 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.