I made the Child Theme – but the changes don’t work.
Here is my child theme’s functions.php file:
<?php
// Removing the Default Action Hook
function unhook_adventurous_functions() {
//remove default secondary menu
add_action( 'adventurous_before_main', 'adventurous_secondary_menu', 10 );
}
add_action( 'init', 'unhook_adventurous_functions' );
// Add Secondary menu after hgroup wrpa
add_action( 'adventurous_after_hgroup_wrap', 'adventurous_secondary_menu', 5 );
I believe both the parent and child theme’s functions.php files are called – if so, how could the child theme overwrite the parent?
I tried adding CSS to fix the 2nd Nav Bar but no luck.
Source Code still shows the 2nd Nav Bar inside the Main Wrapper.
Any suggestions?
I also tried this for child theme’s functions.php
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( 'chld_thm_cfg_parent', get_template_directory_uri() . '/style.css' );
}
endif;
add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
// END ENQUEUE PARENT ACTION
// Removing the Default Action Hook
function unhook_adventurous_functions() {
//remove default secondary menu
add_action( 'adventurous_before_main', 'adventurous_secondary_menu', 10 );
}
add_action( 'init', 'unhook_adventurous_functions' );
// Add Secondary menu after hgroup wrpa
add_action( 'adventurous_after_hgroup_wrap', 'adventurous_secondary_menu', 5 );
but no luck.