Archived topic
Is possible to add content into the sticky menu?
10 replies · Started by Roberto Enrique on May 23, 2017
Hi!
I need to add a couple of links into the sticky menu like here:

Is there a hook or something for that?
Thanks in advance.
Hi Roberto,
This might work: https://docs.generatepress.com/article/generate_inside_mobile_menu_bar/
Let me know.
Are you only wanting to add them into the mobile menu, or the desktop menu as well?
I just need them to be on the mobile/sticky.
If you want to see the issue "live" take a look at the website:
https://www.officinadellozio.com
I'm using some "hacks" to do the menu like that:
I'm using the slide menu for the main nivigation and the mainmenu as a dummy one to display the cart/login links.
As they do not display on mobile I would like to add a cart/login icon beside the hamburger icon in the sticky
Unfortunately, if I add the search to the menu all the layout for the sticky goes crazy.

Any other advice is well accepted.
Thanks in advance.
Try this:
add_action( 'generate_inside_navigation','tu_inside_mobile_navigation' );
function tu_inside_mobile_navigation() {
?>
<div class="mobile-bar-items">
Your stuff in here
</div>
<?php
}
That feels a lot better, thanks :-)
Is possible to display it just in the sticky menu?
My css is struggling...
Add another class to your element: <div class="mobile-bar-items my-custom-area">
Then some CSS:
.main-navigation:not(.navigation-stick) .my-custom-area {
display: none;
}
Awesome!
Thanks :-)
You're welcome :)
Dear Team!
I tried the snippets above, but unfortunatelly not worked for me.
I'd like to add the Fibo Search bar to the mobile menu header near the WooCommerce shopping cart, and to the sticky menu (desktop and mobile too).
Thanks your help!
Hi there,
this is a really old topic... lots has changed since then.
Instead you can create a new Block Element:
https://docs.generatepress.com/article/block-element-overview/
Add a shortcode block for your search plugins shortcode.
Set the Hook to: generate_menu_bar_items
Set the Display Rules to Entire Site.