Site logo

Archived topic

Add a button at the right of the menu

3 replies · Started by Camille on November 22, 2019

Viewing posts 1–4 of 4

Hello

I want to add a Button (with a link) at the right of my sticky menu so that it remains always accessible. How can I do that?

Thanks
Regards,
Camille

Hi there,

you can use the Hook Element:

https://docs.generatepress.com/article/hooks-element-overview/

Add this to create your button:

<a class="sticky-button button" href="URL">Button</a>

Select the inside_navigation hook

Set the Display Rules to Entire site.

Then add this CSS:

.main-navigation:not(.is_stuck) .sticky-button {
    display: none;
}

#sticky-navigation .inside-navigation {
    display: flex;
}

.sticky-button {
    order: 5;
}

Thanks for your answer, can you please take a look at the result? I would like the button to be on the right of the menu (not above like right now)

thanks a lot

Looks like you've decided to use Elementor?

If that's the case then you'll need to check with their support.

Let me know :)

This archived topic is closed to new replies.