I am installing a new theme for my website. I am in the process of adding a child theme but it keeps going wrong for some reason. I am using wordpress. I uploaded the theme, radiate to the bluehost file manager page. then I created another folder called radiate-child. in the child theme folder is style.css and functions.php. both folders exist in the wp-content/themes folder so I know they're in the right place. At first the child theme appeared but wordpress showed no preview and activating it made every page on the site (both back end and front end) redirect to 500 error logos.
here is the functions.php code
<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
wp_enqueue_style( 'radiate-style', get_template_directory_uri() . '/style.css' );
}
?>
<?php
function my_theme_enqueue_styles() {
$parent_style = 'radiate-style'; // This is 'radiate_style' for the Radiate theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'radiate-child',
get_stylesheet_directory_uri() . '/style.css',
array( 'radiate-child' ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>
So I fiddled around with the functions.php above - not sure if it's right. Then I jumped over to my style.css page and made some edits to the header and now in the wordpress themes panel, it says the parent theme does not exist. This is very confusing to me because in that same panel is the theme Radiate. In fact, I set it to my active theme just to see if it is there. When I go to the theme errors it gives me the option to install a parent theme. when I click install it says the theme fails to install because the destination folder already exists. I have heard about errors in the child theme header messing things up so here is mine.
/*
Theme Name: Radiate Child
Theme URI: https://themegrill.com/themes/radiate/
Description: Radiate Child Theme
Author: ThemeGrill
Author URI: https://themegrill.com/
Template: Radiate
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: radiate-child
*/
here is the original
/*
Theme Name: Radiate
Theme URI: https://themegrill.com/themes/radiate/
Author: ThemeGrill
Author URI: https://themegrill.com/
Description: Radiate is a clean, creative and light retina ready responsive blogging theme supporting parallax header image. It integrates primary color option, custom background, custom css and few other features through WordPress customizer. The theme is translation ready and you can get free support on https://themegrill.com/support-forum. View demo at https://demo.themegrill.com/radiate.
Version: 1.2.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: radiate
Domain Path: /languages/
Tags: two-columns, right-sidebar, custom-header, flexible-header, custom-background, custom-menu, custom-colors, post-formats, sticky-post, threaded-comments, translation-ready, featured-images, rtl-language-support, theme-options, blog, e-commerce
Resetting and rebuilding styles have been helped along thanks to the fine work of
Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html
along with Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
and Blueprint http://www.blueprintcss.org/
*/
/* =Reset
side note: when I select live preview for the child theme (when it was previously visible in the theme panel) and radiate it loads a blank page that just says "google analytics" at the top. This does not happen when the theme is activated.
EDIT: changed the template name to 'radiate' which makes it appear in the themes panel. clicking live preview or activating the theme turns everything into 500 errors.
EDIT 2: this is the code I get in the error_log
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/pdo_pgsql.so' - /opt/cpanel/ea-php56/root/usr/lib64/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0