-
AuthorPosts
-
April 11, 2024 at 4:02 pm #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?
April 13, 2024 at 2:26 pm #1439890Hey vbonora,
Please try the following in Quick CSS under Enfold->General Styling:
.home #sub_menu1 { bottom: 0; }
Best regards,
RikardApril 15, 2024 at 9:57 am #1439998Ciao Rikard, the sub-menu with this code doesn’t stay stuck at the bottom after scrolling.
April 15, 2024 at 7:36 pm #1440048Hi,
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,
RikardApril 16, 2024 at 3:06 pm #1440115Hi Rikard, I’ve inserted a widget with the menu on the page. Can you help me now?
April 16, 2024 at 6:36 pm #1440127Hi,
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,
RikardApril 17, 2024 at 10:56 am #1440182Hello 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.
April 17, 2024 at 9:23 pm #1440232Hi,
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,
RikardApril 18, 2024 at 9:53 am #1440269Thank 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
April 18, 2024 at 12:51 pm #1440284Hi,
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,
MikeApril 19, 2024 at 4:34 pm #1440374Thank 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?April 19, 2024 at 5:17 pm #1440383Hi,
Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:#nav_menu-2 { bottom: -90vh; position: absolute; padding: 0; }
Best regards,
MikeApril 22, 2024 at 3:48 pm #1440526Thank 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.April 23, 2024 at 3:26 am #1440552Hi,
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,
IsmaelApril 23, 2024 at 4:12 pm #1440614Hi 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.April 23, 2024 at 5:54 pm #1440619Hi,
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,
MikeApril 26, 2024 at 1:14 pm #1440952Great Mike, thank you! We can close the ticket.
-
AuthorPosts
- The topic ‘submenu’ is closed to new replies.