- This topic has 12 replies, 3 voices, and was last updated 5 years, 4 months ago by
Leo.
-
AuthorPosts
-
December 11, 2020 at 7:19 am #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 menuso 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
SarahDecember 11, 2020 at 9:12 am #1576369David
StaffCustomer SupportHi there,
can you share a link to your site so i can see the current layout ?
December 11, 2020 at 9:26 am #1576390Sarah
yes sorry forgot to post the link!
December 11, 2020 at 10:22 am #1576463Leo
StaffCustomer SupportIs this what you are after?
https://docs.generatepress.com/article/header-examples/#example-8December 11, 2020 at 10:25 am #1576471Sarah
No Sorry that is the primary navigation floated under a search bar widget – I want the secondary navigation under a widget instead
December 11, 2020 at 10:30 am #1576484Leo
StaffCustomer SupportAre you going to be using the sticky navigation?
If not the two navigations are actually interchangeable 🙂
December 11, 2020 at 10:37 am #1576497Sarah
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 youDecember 11, 2020 at 10:44 am #1576511Leo
StaffCustomer SupportSorry – 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.
December 11, 2020 at 10:45 am #1576513Leo
StaffCustomer SupportAlso just to make sure, the solution I linked is the layout you are after…right?
December 11, 2020 at 10:50 am #1576520Sarah
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!
December 11, 2020 at 10:52 am #1576522Leo
StaffCustomer SupportSounds good let me know 🙂
December 14, 2020 at 4:01 am #1579660Sarah
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 linkadd_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!
SarahDecember 14, 2020 at 9:33 am #1580334Leo
StaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.