- This topic has 11 replies, 2 voices, and was last updated 1 year, 11 months ago by David.
-
AuthorPosts
-
April 19, 2022 at 3:13 am #2193244Dominik
Hi, we’re using GeneratePress in a Multisite, working fine, besides the footer is currently missing. We do successfully load the Header from the Main site in all sites with
switch_to_blog( ‘1’ );
do_action( ‘generate_header’ );
restore_current_blog();
But the same for the footer results in a blank footer in the subsites
switch_to_blog( ‘1’ );
do_action( ‘generate_footer’ );
restore_current_blog();
Any idea why that’s not working?April 19, 2022 at 4:12 am #2193277DavidStaffCustomer SupportHi there,
what part of the footer is not working ? I am not seeing a difference between the two sites
April 19, 2022 at 4:20 am #2193282DominikI guess you have been redirected from checkout cause you have an empty cart? Only if you have selected a shop in checkout you see the subsite.
The main site has 5 widgets with Logo, Navigation links, E-Mail and Facebook – the subsites show the 5 widget-DIVs without any content, so it’s probably loading the widgets from the subsite and not from the mainsite.April 19, 2022 at 5:06 am #2193313DavidStaffCustomer Supportis it just the Checkout thats the issue ? If so, check the Customizer > Layout > Woocommerce, at the very end there is an option called Distraction Free Checkout, it will hide things like the widgets, try unchecking that.
April 19, 2022 at 8:15 am #2193718DominikI checked that before I wrote you – as this was the only search result I could find. When that option is checked, the footer is completely empty, here it’s showing the 5 widget divs that are set in the customizer settings. Also, if that was the problem, it would also happen on the mainpage-checkout, which it doesn’t. If you checkout without selecting a store, the footer is there – once you select a store, it’s gone.
It’s ignoring our attempt to load the mainpage footer instead of the subsite footer.April 19, 2022 at 11:30 am #2193899DavidStaffCustomer SupportIs the Plugin installed as a Network active plugin ? Or are there separate settings on each of the sub sites ?
April 20, 2022 at 4:19 am #2194583DominikWhich plugin, GP Premium? It shows settings in all sub sites, how can I install it as a “network active plugin”? And what would be different then? I’d say the question is why the switch_to_blog-function is working for generate_header, but not for generate_footer?
April 20, 2022 at 5:59 am #2194665DavidStaffCustomer SupportWhich plugin, GP Premium? It shows settings in all sub sites, how can I install it as a “network active plugin”?
It should be an option in the Network Admin dashboard, but lets ignore changing that for now.
As you have separate settings for each ‘site’ if you add a Widget to the Footer of one of the local sites, does that Widget show up in the Checkout ? If it does then we can assume its theswitch_blog
function not firing. And then we can do some googling as to why that maybeApril 21, 2022 at 7:53 am #2196123DominikHi David,
I just tried adding widgets to the local sites, they don’t appear – it still shows 5 empty footer-widget-DIVs.
So maybe the switch_blog works, but the generate_footer-function has a problem?
Thanks,
DominikApril 21, 2022 at 8:25 am #2196156DavidStaffCustomer SupportLooks like this is the issue:
https://core.trac.wordpress.org/ticket/22370
Its an old one and is marked as Wont Fix.
April 25, 2022 at 3:22 am #2199214DominikHi David,
thanks for the information.
I now hardcoded the footer in the PHP template – not really an optimal solution, but at least it works.
Thanks,
DominikApril 25, 2022 at 4:23 am #2199263DavidStaffCustomer SupportGlad to hear you got working solution
-
AuthorPosts
- You must be logged in to reply to this topic.