Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #1439751

    Hi Kriesi, I need help getting a fixed menu like this one: https://xd.adobe.com/view/61489a4e-0786-455b-a43b-4b5e3061151e-341b/screen/f5805a3f-f75c-414d-a1cf-b36df0ffd18a. I’m using the submenu, but it stays stuck at the top instead of being fixed at the bottom like I need. I’ll leave you the link to the website and the credentials, can you help me?

    #1439890

    Hey vbonora,

    Please try the following in Quick CSS under Enfold->General Styling:

    .home #sub_menu1 {
      bottom: 0;
    }

    Best regards,
    Rikard

    #1439998

    Ciao Rikard, the sub-menu with this code doesn’t stay stuck at the bottom after scrolling.

    #1440048

    Hi,

    You can try adding to a widget instead: https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area. We can help you out with styling once it’s added.

    Best regards,
    Rikard

    #1440115

    Hi Rikard, I’ve inserted a widget with the menu on the page. Can you help me now?

    #1440127

    Hi,

    Thanks for that, but I can’t see that you have added it yet. Please try following the documentation again: https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area

    Best regards,
    Rikard

    #1440182

    Hello Rikard, I apologize for the confusion. Before proceeding with the changes to the header area, I would like to inform you that this navigation will only be present on this page. Additionally, the site will have a different customization, including the logo and menu, which will not be the current ones. Is it possible to modify the header area only for this page? If so, could you please provide me with the PHP code to do so only for this page? Thank you and have a good day.

    #1440232

    Hi,

    Thanks for the update. Please try this snippet instead in your child themes function.php file:

    add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    	if ( is_home() || is_front_page() ) : 
    		dynamic_sidebar( 'header' );
    	endif;
    }

    Best regards,
    Rikard

    #1440269

    Thank you Rikard, this code works on the homepage, but in the future, this won’t be the homepage anymore. Could you please provide me with the code for the ID instead

    #1440284

    Hi,
    Try this:

    add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    	if ( ( is_page(0000) ) : 
    		dynamic_sidebar( 'header' );
    	endif;
    }

    adjust the number to your page ID

    Best regards,
    Mike

    #1440374

    Thank you Mike, it looks perfect!
    To align it fixed at the bottom like this link https://xd.adobe.com/view/61489a4e-0786-455b-a43b-4b5e3061151e-341b/screen/f5805a3f-f75c-414d-a1cf-b36df0ffd18a/, do I need to work on the padding top of this element ‘div .widget_nav_menu’ or are there other ways?

    #1440383

    Hi,
    Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    #nav_menu-2 {
    	bottom: -90vh;
      position: absolute;
      padding: 0;
    }

    Best regards,
    Mike

    #1440526

    Thank you Mike, it’s perfect now.
    When I click on the menu, the anchor links always leave some space at the top. I’ll leave you a link to the image (highlighted space in blue), so if you enter the website, you can see it too. How can I fix this? Thank you and have a good day.

    #1440552

    Hi,

    Thank you for the screenshot.

    Please try adding this filter to the functions.php file to adjust the scroll position when clicking on anchor links:

    function avf_header_setting_filter_mod($header) {
    	$header['header_scroll_offset'] = $header['header_scroll_offset'] + 100;
    	return $header;
    }
    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);

    Best regards,
    Ismael

    #1440614

    Hi Ismael, thank you, it works well.
    Can I use this code for just one page? How do I modify the PHP with ID 2? Thanks, and have a good day.

    #1440619

    Hi,
    Try using this code instead:

    function avf_header_setting_filter_mod($header) {
    	if( is_page( 2 ) ) {
    	$header['header_scroll_offset'] = $header['header_scroll_offset'] + 100;
    	}
    	return $header;
    }
    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);

    Best regards,
    Mike

    #1440952

    Great Mike, thank you! We can close the ticket.

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘submenu’ is closed to new replies.