- This topic has 12 replies, 2 voices, and was last updated 6 years, 3 months ago by
Leo.
-
AuthorPosts
-
September 6, 2017 at 10:54 am #380499
Kevin
Hi,
How do I disable the primary navigation and keep the secondary navigation?
1. For this site (http://meine-ec-karte.de/) I’d like to have the same menu you have on https://generatepress.com/
2. How do I add the Logo on the left of the secondary menu?
3. CTA on the right after “Blog”
To add a CTA I’ve tried the following but hasn’t worked:add_action( 'generate_inside_navigation','generate_add_navigation_button' ); function generate_add_navigation_button() { ?> <a class="nav-button" href="https://www.cardduo.eu/mainpage?ref=JCBnav.CD-FA&s_id=25952C56233929T">Bestellen</a> <?php }
nav-button, .nav-button:visited { float: right; background: #5eb846; color: #FFFFFF; } .nav-button:hover { background: #418031; color: #FFFFFF; }
Thanks
September 6, 2017 at 11:10 am #380511Kevin
Just a follow up:
I used this CSS as described in the documentation here: https://docs.generatepress.com/article/navigation-logo/
.site-header { display: none; }
That has solved issue #1 for Desktop. For mobile the header is still visible
September 6, 2017 at 2:40 pm #380601Leo
StaffCustomer SupportAny reason why you would want to disable primary navigation and only use the secondary?
Looks like you only have menu currently so you can achieve the exact same thing by using the primary menu only.2. I would recommend using primary navigation as the note above then you can use the navigation logo: https://docs.generatepress.com/article/navigation-logo/
3. This method would work better: https://docs.generatepress.com/article/adding-buttons-navigation/
September 6, 2017 at 3:05 pm #380626Kevin
Hi Leo,
I was actually trying to just achieve the same menu bar you guys have > https://generatepress.com/ including my logo on the left and a cta on the right.
2. https://prnt.sc/ghzrn5 https://prnt.sc/ghzmdw … still not getting the logo image
3. You suggestion worked. Just can’t get the hover color right.
@media (min-width:769px) { .secondary-navigation .main-nav ul li.nav-button a { background-color: #418031; border: 2px solid #000000; color: #FFFFFF; } } .secondary-navigation .main-nav ul li.nav-button a:hover { background:#418031; color:#FFFFFF;
September 6, 2017 at 5:13 pm #380674Leo
StaffCustomer SupportGP’s menu is using the primary navigation, not secondary.
Try activate primary navigation back, then set it to float right: https://docs.generatepress.com/article/navigation-location/
Then the navigation logo should work.
Once you did that do I’ll have another look at the hover CSS π
September 6, 2017 at 9:24 pm #380752Kevin
Hi Leo,
I’ve reactivated the primary nav and deactivated the secondary nav.
September 6, 2017 at 10:21 pm #380771Leo
StaffCustomer SupportThen you should be able to follow the steps here: https://docs.generatepress.com/article/navigation-logo/#navigation-as-header
Did you try that?
September 6, 2017 at 10:49 pm #380777Kevin
Hi Leo,
Yes I did π It was the cache … I just had to clear the cache.
Thanks for your patience!
September 6, 2017 at 11:13 pm #380782Leo
StaffCustomer SupportNo problem! Looks like you got the button working as well?
September 6, 2017 at 11:16 pm #380783Kevin
Yup. I used the button class that we had previously created
Just a slight kink. On this page > http://meine-ec-karte.de/blog/ , there seems to be a gap at the top that’s not visible on all other pages
September 6, 2017 at 11:25 pm #380790Leo
StaffCustomer SupportHmm did you add this CSS somewhere?
@media (min-width: 769px) { nav#site-navigation { margin-top: 10px; } }
September 6, 2017 at 11:36 pm #380793Kevin
That was originally there … to adjust the Navi bar on mobile … the logo appears larger on mobile and shifts the Menu under
The original css looked like this:
@media ( min-width: 769px ) { nav#site-navigation { margin-top: 42px; } }
I’ve been trying to adjust the Navi bar for mobile
September 7, 2017 at 8:01 am #381009Leo
StaffCustomer SupportFor mobile only you will need
@media (max-width: 768px)
@media (min-width: 769px)
is for desktop only. -
AuthorPosts
- You must be logged in to reply to this topic.