I'm fairly new to Wordpress. I'm using the shop-isle theme that has a default navigation menu. I'm trying to override this with a fancy ‘Ubermenu’ plugin but the default collapse symbol keeps overriding the plugin.
The theme header is loaded from directory shop-isle/inc/structure/header.php.
I copied the entire directory to my child theme directory and made edit below in /header.php but it only works when I add it to the 'structure' folder in the parent theme NOT the child.
example 1
<?php if( function_exists( ‘ubermenu’ ) ): ?>
<?php ubermenu( 'main' , array( 'theme_location' => 'primary' ) ); ?>
<?php else: ?>
<div class="header-menu-wrap">
<div class="collapse navbar-collapse" id="custom-collapse">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container' => false,
'menu_class' => 'nav navbar-nav navbar-right',
)
);
?>
</div>
</div>
<?php endif; ?>
I tried unhooking the function that loads the header but that removes the header all together!
The main header.php calls shop-isle/inc/structure/header.php.
using
<?php do_action( 'shop_isle_header' ); ?>
The hooks.php located in shop-isle/inc/structure/hooks.php
has the callback function registered using
add_action( 'shop_isle_header', 'shop_isle_primary_navigation', 50 );
I've copied all the files over to my child theme and kept the directory structure the same but it does not override the parent files.
How do I add the above code (example 1) in 'functions.php' in my child theme to update 'shop-isle/inc/structure/header.php'?