Site logo

[Resolved] 2 issues: Overlay Header + Top Bar / Content Template not showing in editor

Home Forums Support [Resolved] 2 issues: Overlay Header + Top Bar / Content Template not showing in editor

Home Forums Support 2 issues: Overlay Header + Top Bar / Content Template not showing in editor

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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:

    https://imgur.com/iAdFdBM


    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/KQ6m5Xr

    Is 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/BbSMm5h

    What I actually see:
    https://imgur.com/f3iovlG

    Thank you for any help.

    #2550417
    Martin

    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%;
    }

    #2550483
    Ying
    Staff
    Customer Support

    Hi Martin,

    Can you link us to your site?

    #2551289
    Martin

    Sure – https://demosite.8u.cz/ (just staging site, 1-2x refresh sometimes needed for proper loading)

    #2551794
    Ying
    Staff
    Customer Support

    For 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.

    #2552026
    Martin

    Thank you for your help 🙂

    #2553457
    Ying
    Staff
    Customer Support

    You are welcome   🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.