Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #836635

    Hiya

    I’m attempting to add the full width submenu to the posts template just below the theme navigation. I’ve managed to add and the output looks good using

    	 <div class="clear"></div>
    <div id="sub_menu1" class="av-submenu-container main_color blog_menu  av-sticky-submenu container_wrap fullsize" style="z-index:301"><div class="container av-menu-mobile-active ">
    			<?php wp_nav_menu( 
    				array(
    					'menu' => 'Categories',
    					'menu_id' => 'categories',
    					'menu_class' => 'av-subnav-menu av-submenu-pos-center',
    					'container' => false,
    					'fallback_cb' => false
    					)
    				);
    			?>
    </div></div>

    However for some reason I can’t get the span classes for avia-bullet, avia-menu-text or avia-menu-fx to show on the menu i’ve added via single.php?

    Is there a quick way to fix?
    Thanks
    Richard

    • This topic was modified 1 year, 9 months ago by  raslade.
    #836744

    Hey raslade,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Best regards,
    John Torvik

    #836840
    This reply has been marked as private.
    #839123

    Hi,

    Instead of wrapping the wp_nav_menu inside the sub menu shortcode, please try to use the actual sub menu shortcode in combination with the do_shortcode function. Something like this:

    echo do_shortcode("[av_submenu which_menu='center' menu='' position='center' color='main_color' sticky='true' mobile='disabled' mobile_submenu='']
    [av_submenu_item title='Menu Item 1']
    [av_submenu_item title='Menu Item 2']
    [/av_submenu]");

    Best regards,
    Ismael

    #839168

    Hi Ismael
    Thanks for this but do you mean add this example to the single.php file or in to the functions file?

    Richard

    #839465

    Ismael

    I’ve added the following to functions:

    add_action('ava_after_main_title', 'ava_after_main_title_mod');
    function ava_after_main_title_mod() {
    	if( is_singular('post') ) {
    	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]");
    }
    }

    Which has worked for posts only. However it’s pushing the widget column down the page. See link.

    Any idea how to fix?
    Thanks
    Richard

    #839730

    Hi,

    The element creates another closing div which breaks the layout of the page. Please replace it with the following codes.

    add_action('wp_footer', 'ava_after_main_title_mod');
    function ava_after_main_title_mod() {
    	if( is_singular('post') ) {
    	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');

    Best regards,
    Ismael

    #839769

    Hi Ismael

    Perfect thank you very much for the extra code. Works like a dream.

    Richard

    #839886

    Hi Richard,

    Glad Ismael could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Victoria

    #840595

    Thanks Victoria, will do.

    #840654

    Hi,

    Will close the ticket here, please feel free to create a new one if you need anything else.

    Best regards,
    Basilis

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Adding full width submenu to post template’ is closed to new replies.