• Resolved niikk

    (@niikk)


    Hello,

    I Like the plugin much but I have problems with CCS and also the min-height container.

    First, I have enabled the “Legacy CSS solution” but my sticky header is not working correctly. But I think this has something todo with the second problem.

    Secondly, I use GeneratePress as Theme and I also user Header Elements to create new nice headers on specific pages. BUT if I use such headers, I always get a big white space in the header. On pages, where no new header element is created it works better. The Problem is, that plugin wraps the content with a min-height container. Unfortunately its being hooked in after the Header Wrap with the merged header element requires which comes from GP Theme. Which is breaking the containment.

    Is there a fix for this? If not, i’m and probably other GP user not able to use this plugin which would be pity.

    Cheers

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @niikk

    By looking at your page it seems to me that the structure you’ve made is incorrect.
    The canvas element (<div id="ocs-site" ...>) is within the .header-wrap div.

    Have you followed the installation instructions correctly?
    What hooks are you using?

    Cheers, Jory

    Thread Starter niikk

    (@niikk)

    Hi @keraweb

    Thanks for your fast reply! ??

    Yes, I guess no.. but I can check again. I use GeneratePress so I guess I can go with the “Basic theme setup” and change hooks (https://github.com/JoryHogeveen/off-canvas-sidebars/wiki/Compatible-theme-hooks) to the GP related hooks.

    But I guess I also have to made some changes in the <body>. This infos are from the “Simple theme setup”. I thought I had to take only one of these setup steps.

    I’m right?

    Cheers

    Thread Starter niikk

    (@niikk)

    UPDATE: @keraweb

    I just checked the header.php and footer.php

    There is “do_action( ‘generate_before_header’ );” and “do_action( ‘generate_after_footer’ );” already insert. So i did’t made any changes. What is missing here? ??

    • This reply was modified 4 years, 5 months ago by niikk.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hmm, my first guess would be that the custom headers also use the same hook but at a lower priority.
    The next release will allow you to overwrite the priorities through the settings but for now you still need the filter to make sure.

    Could you try adding to following to your functions.php?
    add_filter( 'ocs_website_before_hook_priority', function() { return -5; } );

    I hope this will fix the hook order for generate_before_header.
    If that doesn’t work, could you try to use the WP default setup since WP 5.2:
    https://github.com/JoryHogeveen/off-canvas-sidebars/wiki/Compatible-theme-hooks#since-wordpress-52

    Eg, use the wp_body_open hook instead of generate_before_header.

    Let me know!

    Cheers, Jory

    Thread Starter niikk

    (@niikk)

    Hi @keraweb

    With the add_filter in functions.php the space is gone.

    But now I have two side-effect related to the Header/Nav bar.

    1. The header is actually transparent. But on Desktop the header change the background to a kind of black. After a page reload the header is for 1sec transparent and then it changed automatically to this color. BUT on mobile, the header is transparent and correct.

    2. The sticky Header does not work properly. Take a look at https://int.brewmee.ch/shop/ There you can see how it would work if you scroll down and back to the top. This was working bevor adding the off canvas plugin. ??

    Cheers

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @niikk

    I checked the sites:

    1)
    The header actually has this color once you scroll down. This is not something done by this plugin but by your theme. If you scroll all the way up it’s transparent again.

    2)
    I don’t see any issues? Did you already fix it??

    Cheers! Jory

    Thread Starter niikk

    (@niikk)

    Hi @keraweb

    EDIT: oh dear.. it was a cache issue on my local pc.. I delete the cache first for 24h but no success. I installed the plugin 2 day ago. So I cleanup my cach for 2 day and now its working. Yippe! ??

    I only have one question left: You mentoined

    Eg, use the wp_body_open hook instead of generate_before_header.

    . Actually the sidebar work so do I have to do that or not? ??

    • This reply was modified 4 years, 5 months ago by niikk.
    • This reply was modified 4 years, 5 months ago by niikk.
    • This reply was modified 4 years, 5 months ago by niikk.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @niikk

    Actually the sidebar work so do I have to do that or not? ??

    From what I could see in the pages you shared the setup seemed correct so I’d say it’s good like it is now!

    Closing this topic ??
    Enjoy the plugin and if you have any questions don’t hesitate to ask!

    Also, please consider leaving a nice review, it will help the plugin grow ??

    Thanks! Jory

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘min-height container generates big space in header’ is closed to new replies.