Site logo

Archived topic

Fix background in main menu in some page with elements

14 replies · Started by rafel jesus on June 14, 2020

Viewing posts 1–15 of 15

Hi there.
I have a question, Can I do in the main menu a white background but only in some pages with elements?
And the second question is Can I do fix the main menu but in all pages except the principal with elements?
If it's yes, How can I do?

Thanks from Balaguer

Hi there,

Not sure if I understand.

Can you disable the maintenance mode so I can see your set up?

Hi Leo.
The first part I did with elements.
I only need to fix the primary menu in some pages exclude the home page.

The web site is under construction if you need to see something we’ll synchronize for seeing something very quickly.
Thanks.

Hi there,

You can adjust the navigation colors using the Header Element, so if you build a Header Element for a set of pages, you can adjust the navigation colors for those pages.

As for the fixed menu - are you trying to set up the sticky navigation only on some pages? That's a bit harder. Are you wanting to disable it only on some pages, or enable it only on some pages?

Hi there.

The colors Header Element for some pages I did and in those pages, I'd want to sticky navigation but only in those pages.
Now when I do scroll the primary navigation is fixed in all the pages, I'd want to sticky navigation but only in those pages.
Thanks from Balaguer

Hi Leo.
I’m going to try and say to you.
Thanks from Balaguer.

Hi Leo.
I did with code snippets because I work with Child Theme, but the code didn't work.

Thanks from Balaguer

What is the actual code you are using?

Can you link me to the page that's not working?

Hi Leo.
Where can I send access to the backend of this website.?
Thanks

I don't need the dashboard access just yet.

Can you send me the live link to the website?

You can edit the original topic and use the private URL field.

Let me know :)

The website is under construction and the pages aren’t visible.

That link says under construction.
You can send the Site Login details using the Account Issue form here:

https://generatepress.com/contact/

Please add the URL of this forum topic to the form as well.

So right now you have the sticky navigation turned off in the Customizer.

The function Leo provided actually turns it "on" as the theme only looks for a non-false value.

So the function is working, it's turning the sticky navigation "on" within the page you specified.

If you want to disable the sticky navigation only on some pages, you would turn it on in the Customizer, then do this:

add_filter( 'option_generate_menu_plus_settings', function( $settings ) {
    if ( is_page( array( 1, 2, 3 ) )  ) {
        $settings['sticky_menu'] = 'false';
    }
    return $settings;
} );
This archived topic is closed to new replies.