Site logo

[Resolved] header : logo on left + secondary menu & widget on right

Home Forums Support [Resolved] header : logo on left + secondary menu & widget on right

Home Forums Support header : logo on left + secondary menu & widget on right

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1576181
    Sarah

    So this seems to be a layout I use quite a lot but I have not managed to get it quite right

    so logo in header aligned left
    then to the right I would like a widget (which contains social media icons) and then below that the secondary menu

    so its a 2 cols header with right side contains menu and widget on top of each other

    I can do it using the secondary menu as a widget .. but I would really rather used the secondary menu float right and a widget standalone

    possible?

    I can see how to get 3 cols..(https://generatepress.com/forums/topic/nav-in-header-plus-widget/#post-833747) logo 2nd menu widget but not 2

    thank you
    Sarah

    #1576369
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to your site so i can see the current layout ?

    #1576390
    Sarah

    yes sorry forgot to post the link!

    #1576463
    Leo
    Staff
    Customer Support
    #1576471
    Sarah

    No Sorry that is the primary navigation floated under a search bar widget – I want the secondary navigation under a widget instead

    #1576484
    Leo
    Staff
    Customer Support

    Are you going to be using the sticky navigation?

    If not the two navigations are actually interchangeable 🙂

    #1576497
    Sarah

    meaning I can use sticky instead of secondary? – does that sit on the right simpler than the secondary one? or did you mean instead of the primary?
    I am happy to swap from secondary to sticky
    Is it simple to get that as a widget or at least sit to the right of the header with a widget above it ?
    did you see the link I sent in – that shows what I mean – but you can see the header is currently in 3 cols whereas I want the secondary menu under the social media and tel widget
    does that make sense?
    thank you

    #1576511
    Leo
    Staff
    Customer Support

    Sorry – I meant that you can actually swap the primary and secondary navigation as they should have the exact same option except you can only make the primary navigation sticky.

    So if you don’t plan on using the sticky navigation, then simply set your current primary navigation to secondary and set the secondary navigation to primary then that solution I linked would work 🙂

    If not we can tweak the solution to work for secondary navigation as well.

    #1576513
    Leo
    Staff
    Customer Support

    Also just to make sure, the solution I linked is the layout you are after…right?

    #1576520
    Sarah

    ok that makes sense – thank you – I will give that a go – as yes that is the layout style I was after and I had not realised those menus were interchangeable

    I will report back if that works

    Thanks!

    #1576522
    Leo
    Staff
    Customer Support

    Sounds good let me know 🙂

    #1579660
    Sarah

    Hi Leo, David – just to let you know that this worked…

    I made primary menu become – secondary menu
    I then made the old secondary – menu primary
    used the PHP in functions file from link

     add_action( 'wp', function() {
        remove_action( 'generate_after_header_content', 'generate_do_header_widget' );
        add_action( 'generate_before_navigation', 'generate_do_header_widget', 20 );
    } );
    
    add_action( 'generate_before_navigation', function() {
        echo '<div class="primary-navigation-wrapper">';
    }, 15 );
    
    add_action( 'generate_after_navigation', function() {
        echo '</div>';
    } );

    and also then I had to of course swap css and styles across via colours/typography etc
    and finally the only thing that was different was the secondary sub menu width – there is no where to add this in GPP – so manually inserted it using

    .secondary-navigation ul ul {
        width: 350px !important;
    }

    that gave me exactly what I was looking for – thank you!
    Sarah

    #1580334
    Leo
    Staff
    Customer Support

    No problem 🙂

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