Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #890720

    hello,

    Been following a thread where Ismael writes code which places into Functions for theme, adding in Full Width Submenu:

    https://kriesi.at/support/topic/adding-full-width-submenu-to-post-template/

    So far I only change “if( is_singular(‘post’) ) {” to “if( is_singular(‘page’) ) {” to work for my Pages instead of Posts. So far so good!

    Like to please know how to target the correct Menu from Appearance > Menus as it’s showing a random test menu I created, and where to modify specifically to below code?

    Also why are the menu items listed out here.. does it not just use the menu structure from Appearance>Menus?
    i.e…
    [av_submenu_item title='Treatments' link='manually,http://' linktarget='' button_style='']

    add_action('wp_footer', 'ava_after_main_title_mod');
    function ava_after_main_title_mod() {
    	if( is_singular('page') ) {
    	echo "
    <div id='custom-fullwidth'>";
    	echo do_shortcode("[av_submenu which_menu='' menu='4' position='center' color='main_color' sticky='aviaTBsticky' mobile='disabled']
    	[av_submenu_item title='Treatments' link='manually,http://' linktarget='' button_style='']
    	[av_submenu_item title='Spa Days' link='manually,http://' linktarget='' button_style='']
    	[av_submenu_item title='Fitness' link='manually,http://' linktarget='' button_style='']
    	[av_submenu_item title='Fashion' link='manually,http://' linktarget='' button_style='']
    	[av_submenu_item title='Health' link='manually,http://' linktarget='' button_style='']
    	[av_submenu_item title='Special offers' link='manually,http://' linktarget='' button_style='']
    	[/av_submenu]");
    	echo "</div>
    ";
    }
    }
    
    function ava_custom_script_mod_submenu(){
    ?>
    <script>
    (function($){
    	$('#custom-fullwidth').next('.clear').appendTo('#custom-fullwidth');
    	$('#custom-fullwidth').next('.av-submenu-container').appendTo('#custom-fullwidth');
    	$('#custom-fullwidth').next('.sticky_placeholder').appendTo('#custom-fullwidth');
    	$('#custom-fullwidth').prependTo('#main');
    	$('#custom-fullwidth').prependTo('#main');
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_custom_script_mod_submenu');

    Thanks!

    #891016

    Was able to solve the Menu Id, it was quite simple just shown in browser URL. So just the second part of question above. Nice bit of code from Ismael.

    Also can the sub menu be made to underline the selected link button, like the Main Menu does (or make the text bold or similar)? I’d prefer the bold text option but this might shake the menu sideways when links are selected..

    thank you

    #891829

    Hi,
    Try this code in the General Styling > Quick CSS field:

    #top #header.header_color.av_header_transparency .av-main-nav>li.current-menu-item >a .avia-menu-text {color: red !important;}
    #top .header_color.av_header_transparency .avia-menu-fx {background: red !important; 

    Adjust the color to suit.

    Best regards,
    Mike

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.