Secondary navigation on mobile question

Home Forums Support Secondary navigation on mobile question

Home Forums Support Secondary navigation on mobile question

Viewing 15 posts - 16 through 30 (of 40 total)
  • Author
    Posts
  • #212431
    Tom
    Lead Developer
    Lead Developer

    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');
    }
    #217027
    Jono

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

    – Jono

    #217059
    Tom
    Lead Developer
    Lead Developer

    Awesome, glad to hear it works πŸ™‚

    #222049
    Karim

    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

    #222217
    Tom
    Lead Developer
    Lead Developer

    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%;
        }
    }
    #222256
    Karim

    Worked perfectly sir. Thanks alot:)

    #222349
    Tom
    Lead Developer
    Lead Developer

    No problem! πŸ™‚

    #282893
    Dominik

    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!

    #283078
    Leo
    Staff
    Customer Support

    Hi Dominik,

    Is this the code you tried? https://generatepress.com/forums/topic/secondary-navigation-on-mobile-question/#post-120014

    I just tested and it’s working for me

    Make sure you click “Save Changes and Activate” in Code Snippet.

    Let me know.

    #283154
    Dominik

    Hi Leo,

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

    #283157
    Leo
    Staff
    Customer Support

    You’re welcome πŸ™‚

    #333626
    Jason

    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.

    #333627
    Leo
    Staff
    Customer Support

    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?

    #333629
    Jason

    Only using Code Snippets.
    Cache has been cleared.
    Here’s the site: http://towtruck.wpengine.com/

    Thanks for your help in advance.

    #333635
    Leo
    Staff
    Customer Support

    I don’t see the secondary menu toggle button which means the CSS is working which is good.

    Tried the PHP here and it worked for me so just want to make sure this is what you added: https://generatepress.com/forums/topic/secondary-navigation-on-mobile-question/#post-120014

    Also make sure you click Save Changes and Activate in the snippet.

Viewing 15 posts - 16 through 30 (of 40 total)
  • You must be logged in to reply to this topic.