- This topic has 15 replies, 2 voices, and was last updated 4 years, 11 months ago by David.
-
AuthorPosts
-
May 1, 2019 at 4:40 am #885353Femke
Hi,
I am trying to create a navigation menu with my logo in the center. I have gone through the steps https://docs.generatepress.com/article/centering-logo-navigation/ . The menu is split with a menu seperator and showing the text ‘menu seperator’. But instead of the text there should be the logo. I have added the css as is mentioned in the article. Hope you can help out, thanks!
May 1, 2019 at 4:51 am #885367DavidStaffCustomer SupportHi there,
any chance you can remove your coming soon page so i can see what the issue is.
May 2, 2019 at 12:58 am #886222FemkeHi David,
I have disabeled the coming soon page.
(I also have another issue with the menu bar not showing at all now) Just opened a new ticket for that.
Hope you can help out!
Thank you!May 2, 2019 at 3:57 am #886351DavidStaffCustomer SupportSo first thing can you add a logo to the Site Identity so it appears in the static navigation.
Where did you add the CSS?May 2, 2019 at 5:29 am #886456FemkeHi, I have added the logo and put back the CSS (sorry I deleted it to test something). Now it seems to work out with the logo in the middle. What I need it to do is to not show the logo until you scroll down. So the logo should only show in the sticky menu when scrolling down. At the moment when scrolling down, the logo is located on the left side in the menu instead of in the center.
Also, the menu items seem very far apart, is there a way to get them a bit closer to eachother?
May 2, 2019 at 6:00 am #886491DavidStaffCustomer SupportThis method won’t work with the Sticky Navigation. So if you can keep it how it is and just disable the sticky navigation ill look at a way of fixing the header and hiding the logo until you scroll down.
May 2, 2019 at 6:04 am #886493FemkeOk great, thank you. I have disabled the sticky navigation.
May 2, 2019 at 6:44 am #886532DavidStaffCustomer SupportSo add this CSS:
.site-header { position: fixed; width: 100%; z-index: 100; } .site-logo { opacity: 0; transition: opacity 0.3s ease-in; } .site-logo.logo-show { opacity: 1; }
Then add this Javascript:
<script> var scrollPosition = window.scrollY; var targetLogo = document.getElementsByClassName('site-logo')[0]; window.addEventListener('scroll', function() { scrollPosition = window.scrollY; if (scrollPosition >= 30) { targetLogo.classList.add('logo-show'); } else { targetLogo.classList.remove('logo-show'); } }); </script>
May 2, 2019 at 6:52 am #886653FemkeThanks, I have added the css but where can I add the Java script?
May 2, 2019 at 7:03 am #886665DavidStaffCustomer SupportSimplest way is add it to a Hook Element.
https://docs.generatepress.com/article/hooks-element-overview/
Select the
WP_footer
hook and set the Display Rules > Location: Entire Site.May 2, 2019 at 7:13 am #886692FemkeThat worked! Nice! Thank you!
Any chance you can have a quick look at something else? Something strange is happening on the homepage. when I want to add a new section, it is vertically displayd. I think a setting is messed up with column with but I cannot find in anywhere, driving me nuts.
Do you have an idea
May 2, 2019 at 8:34 am #886798DavidStaffCustomer SupportIs this issue inside the Elementor editor? I can’t see a problem on the sites home page.
May 2, 2019 at 8:36 am #886800FemkeYes its in Elementor editor
May 2, 2019 at 8:54 am #886830DavidStaffCustomer SupportMight be something you want to ask Elementor about.
But why not delete that Section and rebuild it.May 2, 2019 at 10:02 am #886886FemkeI have disabled all the plugins and only activated the ones i use. Now, my layout in Elementor looks normal again. Must have been one of the plugins. Thanks again for your help, really great support!
-
AuthorPosts
- You must be logged in to reply to this topic.