Hi there,
Bit of a strange one here. Essentially I’m currently just playing around with page templates, and have encountered the below issue for pages using the Page Builder plugin on the Vantage premium theme.
I’m using a static homepage and using the Page Builder to insert a post loop widget. When setting the homepage Page Attributes > Template to “Default Template” (which picks up the page.php file from the Vantage parent theme), I’m ending up with the Homepage that you can see on http://laurencariscooks.com. Nothing changes if I copy the page.php file into the root of my child theme, which is what I would expect.
However, when I copy this same page.php file into the “templates” folder, give it a new file name, give it a new title within the file, and then tell my homepage to use this new template, my sidebar drops so that it only starts at the very end of my #primary content area. In other words, it ends up with a blank #secondary content area for the entirety of the page that is showing the post loop, with the sidebar content only beginning after the loop has finished.
If I use this same template on pages that aren’t using the Page Builder plugin, nothing changes – the sidebar stays in the same position.
Currently I’ve only tested this on my local site, so if you haven’t encountered this issue before and would need to see it in action, I’ll upload a test page to demonstrate.
Any help / clarification would be appreciated!
Thanks,
Ben
Hi Ben
So basically what’s happening here is that Vantage doesn’t expect you to be using a sidebar on the home page. Regardless of template. I haven’t looked into this properly, but I’d actually say it’s a bug, so I’ll try fix this up in the next update of Vantage.
For now, you can use some custom CSS to fix this. You’ll need to remove this if you ever want to go back to a more standard home page without a sidebar.
You can just add that to your custom CSS editor.
Hi Greg,
Many thanks for looking into this and the response. That would be great if it did get fixed up in the next update – please do let me know if it makes it in there.
In the meantime I’ll try out the custom CSS and get back to you on whether it resolved the issue.
Thanks for your understanding Ben. Let us know how that goes.
Hi Greg / Andrew,
Sorry for not getting back to you sooner – I only just got around to testing this out.
Unfortunately the custom CSS didn’t fix the issue – the sidebar still drops when I switch to a template in the templates folder. Also, the “width: auto;” overrides my earlier custom css for setting the #primary and #secondary widths:
Do you have any other suggestions?
Thanks,
Ben
Hey Ben. Any chance we can see this in action? Can you re-create the bug quickly? I’m online for another hour or so.
Sure – let me see if it’s homepage only, and if not I’ll recreate the issue on a test page.
Will update you shortly.
Super, thanks.
Hi Andrew! I’m afraid it does only happen on the static homepage when using any template in the “templates” folder. It renders the sidebar fine on the homepage when using the Default template.
As this is isolated to the static homepage, and using Page Builder on a test page with different templates didn’t re-create the issue, I do agree with Greg that this is a Vantage issue. However I’m reluctant to recreate the issue on my homepage on my live site.
Let me know if you have any other suggestions – it’s not a critical issue, but of course I’d like to help squash any of those pesky bugs :)
This is my usual fix for what I think you’re referring to:
Let us know if it comes up again. That snippet should hopefully handle this until we’ve resolved the problem.
Thanks Andrew – unfortunately the last solution didn’t help either.
I’ll come back to you if I find any more useful info or if I manage to replicate the issue live.
Can you send me a ZIP of your child theme? Might be a bit quicker than me setting this up from scratch?
[email protected]. No rush.
Apologies for the delay. (Thanks for helping out on another thread I saw on the forum, that’s almost most appreciated.)
Please try this:
When using Page Builder on the home page you get a body class: .siteorigin-panels-home. There is a selector targeting that along with the other full width templates.
Your new page template adds its own body class. As the two classes are in the same tag, the body tag, we omit the space and roll back the: float: none; that was there before with a regular: float: left; that we’d expect the primary div to have when a sidebar is present.
Hope this makes sense. Let me know. We’ll go from there.
Cheers
Fantastic Andrew – that worked perfectly!
Makes complete sense – we needed to increase / correct the specificity to get the float: left to take correctly. Many thanks for taking the time to look into this.
And as ever, I’m more than happy to help out when I have a chance, it’s no problem :)
Have a great day!
That’s it! Glad we could help and thanks waiting.
Chat soon.
Cheers