Archived topic
Site title sticky
24 replies · Started by Flemming on August 28, 2017
Hi,
I used to have a png logo on my site, but now I changed it to a normal Site Title from GeneratePress.
However, when I scroll down the Site Title disappears.How do I make the Site Title sticky?
I found this link of yours but it seems very difficult. Can you please guide on how to do this in a 1, 2, 3, guide?
https://generatepress.com/forums/topic/site-title-align-with-the-primary-menu-text/
I want the entire header with site title to be exact same even when scrolling. Just like old days with frames. Why does GeneratePress not support this?
br
Flemming
Hi there,
The steps here should do the job: https://generatepress.com/forums/topic/site-title-align-with-the-primary-menu-text/#post-309814
Let me know if you get stuck :)
Hi Leo,
Thanks, but I have seen that link, and it makes no sense. It does not tell where to do what.
I searched on hooks etc. but could not make it work.
Why is it that difficult?
The instruction is below each block of code (the links after "Using this method:")
The first block of code can be added using Code Snippet: https://docs.generatepress.com/article/adding-php/#code-snippets
The second block of code can added using Simple CSS or Addtional CSS: https://docs.generatepress.com/article/adding-css/
The feature is on the road map :)
Okay, I tried this, but the style of the Site Title is not inherited from the generatepress customizer.
Is that possible to do by altering the css ?
Sounds good it is on road map - can I dare to ask if it is soon or next year?
It can be done with some CSS. Can you link me to the site?
No timeline yet unfortunately. This has not been requested a lot and can be easily accomplished with hooks and CSS so it's lower on the priority list but we will get to it :)
This should be your CSS:
.menu-site-title {
font-family: "Noto Serif", serif;
font-weight: normal;
font-size: 35px;
color: #464866;
}
Thanks a lot - helped, still the site title a bit too high, and menu lines also jumping, but must be some padding stuff...
PS! Your css is actually better than the menu in generate press on tablet and mobile, where your menu is more tight.
I have a lot of white space in tablet and mobile view under menu. Can you guide a bit on how to adjust the menu in generate press to be aligned with your css?
Actually try this to achieve the look you are going for: https://docs.generatepress.com/article/navigation-logo/#navigation-as-header
I have now tried this.
I noticed that mobile is still with white space, and I noticed that the header is not sticky (always shown) anymore.
It was not possible to alter bullet 3: "Set your Navigation Logo Position to Sticky + Static" since I do not have a logo. Is that the reason it is not working?
Weird that the sticky navigation no longer works...
Did you add a custom-fixed-header class anywhere?
Yes, I did have a custom-fixed-header in GP hooks. Now it is removed, and header is now sticky. Great.
Last thing: Mobile view has a lot of white space under burger menu selection, do you know how I can remove the white space?
PS! Thanks for all great help here - really appreciate - nearly there but I lost the link til home of webpage clicking at site title, can that be added to the css?