Site logo

Archived topic

Secondary navigation on mobile question

39 replies · Started by Anonymous on July 10, 2015

Viewing posts 16–30 of 40

Ah, you want it on all blog pages.

Well maybe it would be easier to just remove it on pages?

add_action('after_setup_theme', 'remove_nav_exclude_blog_page');
function remove_nav_exclude_blog_page() {
    if ( is_page() ) 
        remove_action('generate_after_header', 'generate_add_secondary_navigation_before_header');
}

Thank you Tom, your solution adding PHP and CSS worked a treat for me. Handy for when using Secondary Nav for contact details.

- Jono

Awesome, glad to hear it works :)

Hey Tom,

Marvellous how to fix this. I was looking for this solution as well. I added the code in the simple php plugin and then the css. It did exactly what i want, but gave one tiny issue, and that is that a dropdown in the menu is suddenly pushed to the right of the menu, so out of the screen. If i remove the code again it goes nicely down as is default.

Take a look if you want on test.primemedia.nl

Hi there,

Give this CSS a try:

@media (max-width: 768px) {
    .widget-area .secondary-navigation ul ul {
        position: relative;
        clear: both;
        left: 0;
        width: 100%;
    }
}

Worked perfectly sir. Thanks alot:)

No problem! :)

Hi Tom,

Thanks for the easy theme! Hope you can help me:)

I want to keep my secondary nav open on mobile, without the toggle option. So that it just shows my social icons next to each other inline.
I tried the php and css code, but it looks like it doesn't work. It hides my whole second menu.

See my website here: https://goo.gl/aL5Ott

Thanks!

Hi Leo,

Thanks for you quick reply and solution.
It works! I didn't click the activate button.
Thanks!

You're welcome :)

After adding the CSS via Customizer and then the PHP using both Code Snippets and as an individual plugin, I am still not getting any change with the secondary nav. Am I missing something???

Please help.

Try just using Code Snippets and make sure the snippet is activated.

Also make sure to clear cache if you are using a caching plugin.

If this still doesn't work can you provide a link to your site?

This archived topic is closed to new replies.