Secondary menu/Hooks

Home Forums Support Secondary menu/Hooks

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #88149
    Joseph

    Going nuts, used this code to allow for mobile sizing but still pulling down the images to the middle of the secondary menu.
    The code placed in the style sheet and the images are in the after header section in inline code.


    @media
    screen and (min-width: 769px) {
    .sample-class {
    margin-top:-219px;
    margin-bottom:130px;
    margin-left:10%;
    }
    }

    This is code in the After Header in Generate Hooks.

    You can see here what is happening. provinciawebdesign.com/patronmag when you go into mmobile view.

    #88371
    Tom
    Lead Developer
    Lead Developer

    What exactly are you wanting to achieve? The secondary menu displays beneath the “After Header” hook?

    #88386
    joseph

    When you vie the site on a mobile device and pull down
    The secondary menu, it pulls the logo
    And other image to the middle of the secondary
    Drop down menu. How do I keep the logo and other image in p k ace and in responsive size (smaller)

    #88833
    Tom
    Lead Developer
    Lead Developer

    Hmm, well using negative margins and whatnot will cause weird issues like this – it’s usually best to avoid them.

    We can move the secondary navigation below the hook with this code:

    add_action('after_setup_theme','generate_move_secondary_nav');
    function generate_move_secondary_nav()
    {
          remove_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 7 );
          add_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 11 );
    }

    You can add the above code using your child theme’s functions.php file, or this plugin: https://wordpress.org/plugins/code-snippets/

    Doing so will make it so you no longer have to use negative margins.

    Let me know 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.