移除父主题挂载的动作,注意优先级应该设置的一样。
add_action( 'storefront_header', 'child_remove_parent_function' ); function child_remove_parent_function() { remove_action( 'storefront_header', 'storefront_site_branding', 20); }