Home › Forums › Support › 2 issues: Overlay Header + Top Bar / Content Template not showing in editor
- This topic has 6 replies, 2 voices, and was last updated 3 years, 3 months ago by
Ying.
-
AuthorPosts
-
February 28, 2023 at 11:19 am #2550411
Martin
I have 2 problems that I have been trying to solve for hours, so I finally decided to ask for help 🙂
#1 Overlay Header + Top Bar
I created an Overlay Header using CSS that I found here on the forum. It works great, but the moment I try to place a top bar over the header this happens:
I understand it’s because of – “Position: absolute, top: 0px” and when I adjust it to e.g. top: 2em = header moves slightly down, problem “solved”. But I would need the value Top: 0px/2em, to change depending on whether the top bar is displayed on the page or not. I simply don’t want to manually adjust these values every time I decide to show or hide the top bar. For example via metabox custom field or ACF.What I would like to see:
https://imgur.com/KQ6m5XrIs there a way to solve this?
#2 Design Content Template is not displaying
I created a content template for a custom post type, when I open the corresponding post as a visitor I see the applied design, but when I open the same post in the editor I only see a blank page. I expected to see the applied template design directly in the editor of each individual post it is assigned to, and then just edit the content of that post. Or is it different?
I wish to see it in the editor – and have option to edit it directly:
https://imgur.com/BbSMm5hWhat I actually see:
https://imgur.com/f3iovlGThank you for any help.
February 28, 2023 at 11:23 am #2550417Martin
and this is the CSS code used for Overlay Header:
body:is(.home) .site-header {
background: rgba(17,36,55,0.0);
position: absolute;
top: 0px;
left: 0;
z-index: 10000;
width: 100%;
}February 28, 2023 at 12:46 pm #2550483Ying
StaffCustomer SupportHi Martin,
Can you link us to your site?
March 1, 2023 at 6:14 am #2551289Martin
Sure – https://demosite.8u.cz/ (just staging site, 1-2x refresh sometimes needed for proper loading)
March 1, 2023 at 11:04 am #2551794Ying
StaffCustomer SupportFor issue 1, instead of using that CSS, go to appearance > elements, create a header element, and activate the merge function for the front page.
Here’s a video for your reference: https://youtube.com/watch?v=TP8mgBQTgGg&si=EnSIkaIECMiOmarE
It should set the topbar and site header both to
position: absolute;when I open the corresponding post as a visitor I see the applied design, but when I open the same post in the editor I only see a blank page
This is normal behaviour, the content template will only affect the front end.
March 1, 2023 at 4:27 pm #2552026Martin
Thank you for your help 🙂
March 2, 2023 at 6:14 pm #2553457Ying
StaffCustomer SupportYou are welcome  🙂
-
AuthorPosts
- You must be logged in to reply to this topic.