Upon further inspection, I have determined that there’s an additional stylesheet that now needs to be enqueued in the child theme configuration. Here’s what I have:
Here’s the code I had in the child theme, autoconfigured by Child Theme Configurator:
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:
if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap','hestia-font-sizes','font-awesome' ) );
}
endif;
add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
If I replace this with the Hestia new child theme markup, almost everything is fixed (with exception to the missing Very Top Bar):
<?php
if ( !defined( 'ABSPATH' ) ) exit;
if ( !function_exists( 'hestia_child_parent_css' ) ):
function hestia_child_parent_css() {
wp_enqueue_style( 'hestia_child_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap' ) );
if( is_rtl() ) {
wp_enqueue_style( 'hestia_child_parent_rtl', trailingslashit( get_template_directory_uri() ) . 'style-rtl.css', array( 'bootstrap' ) );
}
}
endif;
add_action( 'wp_enqueue_scripts', 'hestia_child_parent_css', 10 );
/**
* Import options from the parent theme
*
* @since 1.0.0
*/
function hestia_child_get_parent_options() {
$hestia_mods = get_option( 'theme_mods_hestia' );
if ( ! empty( $hestia_mods ) ) {
foreach ( $hestia_mods as $hestia_mod_k => $hestia_mod_v ) {
set_theme_mod( $hestia_mod_k, $hestia_mod_v );
}
}
}
add_action( 'after_switch_theme', 'hestia_child_get_parent_options' );
function accordion() {
wp_enqueue_script('accordion', get_stylesheet_directory_uri() . '/jquery.accordion.js', array('jquery'));
wp_enqueue_script('accordion', get_stylesheet_directory_uri() . '/accordion.js', array('jquery'));
}
add_action ('wp_enqueue_scripts', 'accordion');
I have also found that deleting my header.php in my child theme restores the Very Top Bar, so there is likely a conflict between the parent and child theme in this version.
-
This reply was modified 5 years, 2 months ago by the9mm.