Header and footer gone
-
Thank you very much for this plugin, exactly what I was searching for. However, when I activate the plugin my site header and footer are no longer displayed. I am using the Generatepress theme, the footer is added (depending on the language setting) via the ‘Elements’ feature of Generatepress Pro and the different page headers are added via the simple CSS plugin.
Do you have any idea what could cause the header and footer to vanish?
The page I need help with: [log in to see the link]
-
Hi Belgarath
Is this site in local development?
Are you using Elementor Pro?
I personally have used OceanWp, Astra, but not Generatepress. I now stick to Elementor’s Hello theme as then I have complete control.
Enough about my choices.
I don’t have a Generate Press pro license. So I cannot extensively test this.
PolyLang Connect is designed to use Elementor’s templates. So you would need to create your header and footer templates in Primary Language , save and set conditions. Then create alternative language templates and just click save. Hard work and heavy lifting is all then done by PolyLang Connect.
In Simple CSS,do you have the ability to add alternative languages?
I would like to test your setup and see what feedback I can give you.
- This reply was modified 5 years, 9 months ago by Brad Johnson.
Thanks for your quick response. Yes the site is only available on my local PC right now.
I do not use a special header section just some CSS added via the simple CSS plugin. This plugin has no language setting available. It seems that the plugin′s CSS is striped away as soon as I activate Polylang connect – thus the header is gone.
I have an english and a french version of the footer. Currently I add the footer via a little PHP code (which makes the language selection) – that is done via the ‘Elements’ block of Generatepress Pro (this block basically works like template hooks). I can try to add the footer as an Elementor template element and see if it then shows up and switches with the language. I′ll let you know how it works out.
@belgarath
Hi and thanks for your feedback!I am dave, the developer (coder) of the plugin.
What @p4fbradjohnson said is the current state: the plugin works with Elementor currently only – regarding the template stuff. This means the Elementor Template post type (ID: ‘elementor_library’).
What we do under the hood could technically be done for the GP Elements post type as well. I have GP Premium and I would want to add this post type also to our “connect” feature.
The challenge here is, we modify the WP_Query for templates post type – it’s the proper and only way to do it – but we then need to do it for multiple post types in general.
I cannot guarantee we manage to solve this general issue but we will give our best to make it work in a future version.
The goal here is also for other Elementor friendly themes that have similar post type like “GP Elements”, these would be Astra, OceanWP, Customify, Suki, Page Builder Framework (PBF).
Thanks David for the explanation. For the footer the solution is likely to remove my PHP language selection code and use the new Elementor feature then I guess the footer will work.
But do you have any idea why the CSS from the simple CSS plugin is no longer applied to the website when I activate your plugin? That is a major thing for me because I have on page CSS for a lot of pages.
But do you have any idea why the CSS from the simple CSS plugin is no longer applied to the website when I activate your plugin? That is a major thing for me because I have on page CSS for a lot of pages.
Thanks for your feedback!
This sounds strange but maybe you’ve found a bug.
Question related to that:
– it is “Simple CSS” by Tom Usborne, right? https://www.ads-software.com/plugins/simple-css/
– is all CSS from that plugin gone, also the “global” one or only on the individual pages?
– is it gone for pages that have translations or also for non-translated pages (Polylang)?
– is it also gone when only deactivating our plugin but letting Polylang itself active?Thanks and we will look into this!
- This reply was modified 5 years, 9 months ago by David Decker.
Yes it is the plugin by Tom Usborne.
I now see a bit more what is happening. It is not the simple CSS plugin itself.
I have added the footers for the different languages via the ‘Elements’ feature of GP pro. The header image which I add via the Simple CSS plugin relies on an added class which i also added via the ‘Elements’ feature.
So the problem seems to be that for some reason the ‘Elements’ feature is no longer working correctly when your plugin is active.
I did some testing on my end but not able to reproduce any of the issues you have. Really strange.
First: I found out that “Elements” are not able to be added to Polylang post types – which seems to be caused as “Elements” have no archive and no “real” content field. So, no matter what I did, I couldn’t add this post type to make it translateable via Polylang. Therefore what I wrote above regarding this is not relevant at all.
Second: The Simple CSS plugin is working fine when adding CSS rules to individual pages in the meta box there.
My questions:
What I don’t understand how you are really adding the footers you mentioned? As “Hook” in GP Elements? And for what other type, “Pages” (WP) or “Elementor My Templates”?And, general question, just to be sure, you have Elementor post type enabled in Polylang settings? It is listed as “My Templates” there.
To reproduce this we need the exact steps you did to be able to test and debug any error that might happen.
Since you’re on local install, right?, are you able to send a preview link (tunneling)? Some local apps like “Lokal by Flywheel” or “Valet” would allow that.
If it is not possible please try to give us some screenshots (via a cloud hoster) – also possible via our support email: support -at- wpautobahn -dot- comWhat really is strange to me why our plugin might be interferring with Elements and Simple CSS at all since we do absolutely nothing with both plugins from our end.
What happens if you disable all plugins execept for:
– Elementor
– GP Elements
– Polylang
– Polylang Connect
– Simple CSSDo the issues persist?
I think I found the issue now. Elements has no translation capability via Polylang as you state above so it works on both languages automatically.
What I see now is that as soon as I activate your plugin I get the english and french translation flags in Elements. And because I have not set any language for my Elements blocks neither the footer nor the header is displayed on the english or french version of the site.
I tried now to add a language to the block in Elements that selects the right footer depending on the language and that makes the footer re-appear ??
If you need more images to reproduce the issue I can send it to your support email.
Thanks for your feedback!
Strange, I am not getting the translation flags in Elements, no matter what I do in Polylang settings or via their filter function (API). No chance. But I guess it was possible back in November last year, maybe Polylang did change something internally?
I am on Polylang 2.5.2 – you also?Could you test this code if it does change anything for you?
remove_filter( 'pll_get_post_types', 'ddw_cpel_add_cpts_to_polylang', 10, 2 );
Add via “Code Snippets” plugin (choose “Run snippet everywhere”) – or otherwise to your functions.php of theme.
Then check the post type settings in polylang if “My Templates” (Elementor) are still active or else post types you need.Does this change anything?
Yes, I am also on Polylang 2.5.2, weird that the flags do not show on your site.
I added the code to my functions.php and now the header and footer is there and the language flags in Elements are gone . Thank you, that helps a lot.
Ok good, you can keep the snippet line in.
I will tweak this in the next version.For Elementor just activate in Polylang settings again then it should all work again.
Do you use Elementor Pro?
And if yes, was it also activated in WP?I ask because regarding the snippet above it would only effect Elementor Pro currently (as of our plugin v1.0.0).
Once again thanks a lot.Perfect solution.
Yes I use Elementor Pro and it was activated.
- The topic ‘Header and footer gone’ is closed to new replies.