[Theme: Storefront] Can't get hooks switched to child theme
-
Hello,
I have a child theme created using Wootheme’s Storefront as the parent theme. I am trying to adjust the hooks to remove the storefront_header_cart and also storefront_product_search. I know that I need to comment out or remove
add_action( 'storefront_header', 'storefront_product_search', 40 ); add_action( 'storefront_header', 'storefront_header_cart', 60 );
Because when I do this in the parent theme I achieve the desired effects. However, I can’t seem to implement the hooks and get them to run in my child theme.
I have changed get_template_directory() for get_stylesheet_directory() where necessary, I know because within storefront-child/inc/structure/footer.php, when I change code it is reflected on my site (so the file is loaded correctly.) However, the hooks.php file in the same directory is still being run in the parent theme.
In my functions.php in the root of my child theme I have
require get_stylesheet_directory() . '/inc/init.php';
and in my init.php file I have
require get_stylesheet_directory() . '/inc/woocommerce/hooks.php'; require get_stylesheet_directory() . '/inc/woocommerce/functions.php'; require get_stylesheet_directory() . '/inc/woocommerce/template-tags.php'; require get_stylesheet_directory() . '/inc/woocommerce/integrations.php';
Yet these woocommerce files seem to still reflect what is in my parent theme directory. Am I missing something?
Thanks!
- The topic ‘[Theme: Storefront] Can't get hooks switched to child theme’ is closed to new replies.