- This topic has 7 replies, 2 voices, and was last updated 7 years, 8 months ago by Tom.
-
AuthorPosts
-
July 29, 2016 at 8:46 am #213865Rogier
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
July 29, 2016 at 10:19 am #213892TomLead DeveloperLead DeveloperHmm, 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?
July 30, 2016 at 11:34 am #214163RogierActually, 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.July 30, 2016 at 11:25 pm #214221TomLead DeveloperLead DeveloperInteresting, 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.
August 1, 2016 at 3:56 am #214468RogierSigh… 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?
August 1, 2016 at 10:21 am #214540TomLead DeveloperLead DeveloperAh, 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?
August 2, 2016 at 3:16 am #214732Rogier1. 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. πAugust 2, 2016 at 7:43 am #214791TomLead DeveloperLead DeveloperYou 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 π
-
AuthorPosts
- You must be logged in to reply to this topic.