-
AuthorPosts
-
January 7, 2020 at 8:39 pm #1171200
Hello,
I have a menu which is displayed as icon. But i was wondering about if it is possible to add a menu item to the left of this icon? I just want to have this menu item at one page, and not the others.Is there any tips to fix this?
January 7, 2020 at 9:24 pm #1171235Hey wtek,
Well, it is better to add the widget area to the header and assign the link there in the text widget.
Best regards,
VictoriaJanuary 7, 2020 at 10:12 pm #1171263This reply has been marked as private.January 8, 2020 at 5:12 pm #1171526Hi wtek,
You will need to add and activate the child theme for the changes made in the files to not be overwritten by an update.
Best regards,
VictoriaJanuary 8, 2020 at 7:10 pm #1171563Hi,
I activated the enfold child theme now, it did not work out with the widget.January 8, 2020 at 9:01 pm #1171608Hi wtek,
What do you mean by “it did not work out with the widget”? Did you get errors or did it show up in the wrong place?
Best regards,
VictoriaJanuary 8, 2020 at 9:02 pm #1171609I dont really know. The picture i added to the widget did not show up.
January 9, 2020 at 8:21 pm #1171940Hi wtek,
Did you add the code from the docs to your functions.php? If not, please do it and we can help you do the rest.
Best regards,
VictoriaJanuary 9, 2020 at 9:18 pm #1171958Now it should be in place.
Just do what you need./Ole
January 11, 2020 at 2:56 am #1172326Hi wtek,
Thanks for the information, you can check your site now.
We have replaced this hook ava_before_bottom_main_menu to ava_main_header since it does not work when main menu is not located at the bottom of the logo.
After that, we have added this CSS code in Quick CSS, located in Enfold > General Styling:#header #media_image-2 { position: absolute; top: 0; right: 140px; width: 208px; }
Let us know if you need further assistance.
Best regards,
NikkoJanuary 11, 2020 at 5:38 pm #1172418Allright, Thank you! Is it possible to only get this header visible at some page and not everyone?
January 11, 2020 at 5:45 pm #1172419I have also replaced the image which was in the header before with a custom menu. Could you help me to place it right with the css code? Thank you.
January 12, 2020 at 7:15 am #1172501Hi,
Please try this CSS as well:
#nav_menu-2 { position: absolute; right: 130px; }
Which pages would you like to hide what for?
Best regards,
RikardJanuary 12, 2020 at 2:31 pm #1172526Thank you, the possition worked, but i cant click on the menu item now..
I only want this menu widget to be visible at this page: https://www.wtek.no/it-drift/
/Ole
January 13, 2020 at 5:17 am #1172632Hi wtek,
Please try to replace this code in your child theme’s functions.php from:
add_action( 'ava_main_header', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); }
to:
add_action( 'ava_main_header', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { if( is_page( 3777 ) ) { dynamic_sidebar( 'header' ); } }
Let us know if this helps.
Best regards,
NikkoJanuary 14, 2020 at 10:03 am #1173159Hi,
I changed the code, and it mostly worked out. The menu item is only visible at the correct page, but i cant still click on it.
Is it posible to set the same possition by the screen size? I see when i get to an superwide screen the position get wrong..January 14, 2020 at 5:15 pm #1173457Hi wtek,
For it to be clickable please replace this code:
#nav_menu-2 { position: absolute; right: 130px; }
to:
#nav_menu-2 { position: absolute; right: 130px; z-index: 2; }
As for positioning in wider screen, you can use this code:
@media only screen and (min-width:2048px) { #nav_menu-2 { right: 160px; } }
just replace min-width and right value.
Hope this helps.Best regards,
NikkoJanuary 14, 2020 at 7:03 pm #1173574That worked great!
January 14, 2020 at 10:03 pm #1173672Hi wtek,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 14, 2020 at 10:04 pm #1173673Think i´m good with this case.
January 14, 2020 at 10:30 pm #1173697Hi wtek,
Great :)
We are closing the thread then.
Best regards,
Victoria -
AuthorPosts
- The topic ‘Add additional menu in header’ is closed to new replies.