diff --git a/header-footer-grid/Core/Components/SecondNav.php b/header-footer-grid/Core/Components/SecondNav.php index 5bd348c790..a318ce3d6d 100644 --- a/header-footer-grid/Core/Components/SecondNav.php +++ b/header-footer-grid/Core/Components/SecondNav.php @@ -307,7 +307,7 @@ public function add_settings() { */ public function render_component() { do_action( 'neve_before_render_nav', $this->get_id() ); - Main::get_instance()->load( 'components/component-nav-secondary' ); + Main::get_instance()->load( 'components/component-nav-secondary', '', $this->args ); do_action( 'neve_after_render_nav', $this->get_id() ); } diff --git a/header-footer-grid/templates/components/component-nav-secondary.php b/header-footer-grid/templates/components/component-nav-secondary.php index 051e38b84d..65187545a1 100644 --- a/header-footer-grid/templates/components/component-nav-secondary.php +++ b/header-footer-grid/templates/components/component-nav-secondary.php @@ -10,15 +10,17 @@ namespace HFG; use HFG\Core\Components\SecondNav; +use HFG\Core\Builder\Header as HeaderBuilder; -$style = component_setting( SecondNav::STYLE_ID ); - +$style = component_setting( SecondNav::STYLE_ID ); +$device_class = isset( $args ) && ! empty( $args ) ? $args['device'] : ''; $container_classes = [ 'nav-menu-secondary' ]; + if ( $style !== 'style-plain' ) { $container_classes[] = $style; $container_classes[] = 'm-style'; } - +$menu_id = SecondNav::COMPONENT_ID . '-' . $device_class . '-' . current_row( HeaderBuilder::BUILDER_NAME ); ?>