- This topic has 7 replies, 2 voices, and was last updated 3 years, 12 months ago by David.
-
AuthorPosts
-
April 24, 2020 at 4:49 am #1253120a1reno
Hi,
I’d like to move the search icon from the primary nav up into the header (to replace the social icons on my site: https://share.getcloudapp.com/L1u7pbvJ). I see that you can put a widget there but I only see the search box available and not the icon.
My plan is to get rid of my primary navigation altogether and just have the header which means I’d like to stick my primary menu into the header as well in the form of an off-canvas menu. I couldn’t see how to do this is this possible too? If possible I’d like to place it just to the left of my logo like this one (https://share.getcloudapp.com/KouqBk9x)
Is it possible to make these changes?
Thanks in advance
April 24, 2020 at 5:37 am #1253201DavidStaffCustomer SupportHi there,
will you be wanting the same layout on Mobile ? Or will you be keeping your current layout. Let me know.
April 24, 2020 at 5:49 am #1253222a1renoHi David,
I’ll be keeping the same mobile layout. In fact the desktop one will likely have the same components only the menu icon on the desktop would be to the left of the logo.
April 24, 2020 at 6:18 am #1253284DavidStaffCustomer SupportLets try this then ( yeah its rather complicated ):
1. enable Navigation as Header in Customizer > Layout > Header
2. enable Off Canvas Panel for Desktop as well as mobile.
3. Create a new menu with NO menu items and assign this to your Primary Navigation. Then only the Off Canvas toggle will appear.
4. Now we need to get the site tag line – so create a new Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
4.1 Add this for its content:
<?php bloginfo( 'description' ); ?>
4.2 Select theafter_logo
hook
4.3 Check Execute PHP
4.4 Set Display Rules to Entire Site5. Now add this CSS:
@media (min-width: 769px) { .navigation-branding { position: absolute; left: 70px; } .main-nav { flex: 1 0 100%; box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .2); } .main-nav ul { display: flex; justify-content: space-between; } .main-navigation .main-nav ul li.slideout-toggle a { padding-right: 15px; } }
April 24, 2020 at 6:47 am #1253337a1renoHi David.
That worked really well! One teeny tiny problem is that when I now hover over the new menu something blocks the logo temporarily. Is there a quick fix for this?
Also, I see you replied to my other support question to put a line under the mobile navigation header which I now see I need for the desktop too. What code should I put in to cover both?
Thanks for the help! you seem to be a real wizard with these things!
April 24, 2020 at 6:53 am #1253348DavidStaffCustomer SupportEdited the CSS above to stop the Toggles from overlapping the logo and to include the border below the nav.
April 24, 2020 at 7:05 am #1253366a1renoPerfect!
Thanks for everything!
April 24, 2020 at 8:56 am #1253694DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.