[Resolved] Found bug with "Merge with site header"

Home Forums Support [Resolved] Found bug with "Merge with site header"

Home Forums Support Found bug with "Merge with site header"

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #213865
    Rogier

    Hi Thom, I found a strange bug when I was playing with a custom post-type and choosing the option “Merge with site header”.

    As my custom post-type uses single.php (a custom single-portfolio.php actually), the div #page is positioned in the wrong parent div. It should be above site-footer: http://puu.sh/qiIBu/b50eb29e7b.png

    For now I managed to fix it with jQuery but It would be better to have a fix in the core theme.

        // Get HTML
        var $header = $(".generate-combined-content.grid-container").wrapAll($("<div/>")).parent().html();
        var $content = $("#page").wrapAll($("<div/>")).parent().html();
    
        // Remove old HTML
        $(".generate-combined-content.grid-container").parent().remove();
        $("#page").remove();
    
        // Reposition HTML
        $(".inside-page-header-container").append($header);
        $($content).insertAfter(".page-header-content");

    Also found a messy empty header, but this is not a biggy: http://puu.sh/qiIKa/38e8ffb64e.png

    #213892
    Tom
    Lead Developer
    Lead Developer

    Hmm, well if the structure of the HTML has changed in your custom page template, there’s no way for GP to know that/fix it. The structure needs to stay consistent with the rest of the theme.

    Out of curiosity, in “Customize > Layout > Page Header” – what is the Page Header Position set to?

    #214163
    Rogier

    Actually, my single-portfolio.php is exactly the same as Generatepress single.php. I just made a child version to make future customization…

    My pageheader is set as “Above content area”, but the other option has no positive effect either. I still think this is an interesting bug for you to dive in and make your awesome Generatepress even better compatible with this kind of usage.

    Is there anyway I could PM you my wp login so you can see for yourself how I managed to find this bug?

    [Edit]
    Yup, it definitely a bug in Generatepress, I just came to the idea to change my portfolio post-type to a normal post-type. It gives the same lay-out problem as mentioned earlier. I think it had something to do with a wrongly placed ‘generate_after’ code versus the the way I prefer to use Generatepress: merged and transparant headers on all pages. (Home, pages and posts). It has nothing to do with a custom post type, thats for sure now.

    #214221
    Tom
    Lead Developer
    Lead Developer

    Interesting, did you try playing with the “Single Post Page Header” option as well in “Customize > Layout”?

    Definitely something for me to look into – you can contact me directly with login details through the contact page on this site.

    #214468
    Rogier

    Sigh… That fixed it. I can’t believe it. I tried all options before. I guess I need more experience how to use GeneratePress for advanced use. πŸ˜›

    I’m allready using GeneratePress by default for all my projects. I guess you could say this is my default WordPress framework to start for every future new project!

    Speaking of which:

    1. I was also wondering would it be possible to create custom addons for GeneratePress? Maybe with a special hook?
    I don’t want to create an custom plugin for every customization that I need.

    2. I want the Blog settings in the Customizer also to work for my portfolio (or any other) post-type. Is there a way I can add something to functions.php to get this working?

    #214540
    Tom
    Lead Developer
    Lead Developer

    Ah, I need to make it so that bug can’t happen in the next version.

    1. I’m not sure what you mean? GP is full of hooks and filters, so you can for sure create your own “add-ons” inside a custom plugin or whatever you like.

    2. If those post types use all of the same templates as the regular post type, it should work by default. Which options aren’t working for your custom post types?

    #214732
    Rogier

    1. I mean an actual addon for GP Premium: http://puu.sh/qmWZ9/c07962d269.png without destroying the core offcourse. πŸ™‚
    2. Because of keeping this project private, I’ll send you a PM message so you can see what I mean. πŸ™‚

    #214791
    Tom
    Lead Developer
    Lead Developer

    You mean an add-on that would be included with GP Premium? It would have to be really cool and extremely well written for me to include it. I have a road map I’m currently following for new add-ons, but if you have any ideas let me know πŸ™‚

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