Site logo

Archived topic

Header and 1st Textblock

28 replies · Started by Torsten on March 13, 2023

Viewing posts 1–15 of 29

Hi,
four problems:
- I've set Sticky Navigation "On", but the menu is not sticky.
- When scrolling down I have a line/shadow below the header. How to get rid of that line?
- Is there a way to make the first textblock (Designberatung, email and phone number) sticky underneath the header? Or is there another way to integrate that text inside the header?
- I've set the SlideOut Menu to 365px width and need to set a right-padding for the menu items
Can you help?
Thanks ahead,
Torsten

Hi there,

the site has a div.custom-fixed-header that is wrapping the site header - Its not standard and its most likely related to the non-sticky action.

Where does that come from ?

lets see if we can fix the sticky issue first.

I tried deactivating the installed PlugIns to see if it's caused from one of them.
Nope, that's not the case...
I added you with an admin account, in case that helps, details below.
best,
Torsten

Hi Torsten,

You're using a modified version of the theme. Can you try using the original GP theme to test?

Hi Fernando,
I downloaded the GeneratePress-Theme from Wordpress, deleted the old parent theme folder and uploaded the new themefolder via ftp.
No changes so far.
best,
Torsten

If you Right Click -> Inspect the page, after the body open tag ( and all those SVGs that WP likes to add ) you should see the: custom-fixed-header div

If you disable the child theme - does that element remain?
if it does then i assume its coming from a plugin , which could be determined by disabling those.

Hi David,
the plugin causing the custom-fixed-headerdiv is GP Premium...
This was yesterday pretty much, for obvious reason, the only plugin I didn't deactivate.
best,
Torsten

Ah, in Elements -> Legacy Hooks, there are two hooks, Before Header and After Header containing the HTML for that div.

Hi David,
okay, I deleted the hooks (which I never set) and would like to come back to my initial questions:
– When scrolling down I have a line/shadow below the header. How to get rid of that line?
– Is there a way to make the first textblock (Designberatung, email and phone number) sticky underneath the header? Or is there another way to integrate that text inside the header?
– I’ve set the SlideOut Menu to 365px width and need to set a right-padding for the menu items
Can you help?

Theres the generate_after_primary_menu hook, that you could use to add other content inside the inside-navigation div. Then it would be part of the sticky nav too. If you want to add the content there, i can assist with the CSS to position it.

Hi David,
I've set up the generate_after_primary_menu hook and put in text but I would need your help to find my way to aligning the content with the header (Websitetitle) and keeping it fixed when scrolling.
Btw, I tried using Customizer / Site Identity - but ticking "Hide Site tagline" doesn't change anything.
I was hoping to add the tagline to the header from there, or would it easier to use a header image instead.
best,
Torsten

Hi,
just pushing my last message for review.
best,
Torsten

sorry we missed your last reply.
I messed up its inside the mobile header we need - try this hook generate_inside_mobile_header

Hi David,
with generate_inside_mobile_header the element is only displayed on mobiles, I used generate_after_header instead, now it's displayed on all devices / screensizes below the website title. Or am I wrong?

Now the header (Websitetitle) and element (4 lines in total) should be sticky.
For left-aligned with the first textblock / headline below (Über mich) on all devices, I know I'll have to work on the layout, setting full width for row / contained for content.
best,
Torsten

Ok, i made an update to your Hook:

i changed the Hook to: generate_after_primary_menu and its priority to 40 so the HTML is printed after the other nav items.

I wrapped the HTML in a div.nav-content

If you add this CSS to make it align to the bottom row:


.nav-contact {
    order: 50;
    flex: 1 0 100%;
}
This archived topic is closed to new replies.