Archived topic
Sections have disappeared
7 replies · Started by Chris on May 9, 2021
I am building a site with pages that use Sections. I disabled the premium modules and then re-enabled them... and the Sections have now disappeared!
What have I done wrong?
UPDATE: I have solved this. I looked at earlier posts and found you have recently deprecated Sections. I then found this code:
add_filter( 'generate_premium_deprecated_modules', function( $modules ) {
foreach ($modules as $key => $value){
if ($value == 'Sections') {
unset($modules[$key]);
}
}
return $modules;
});
Added it in functions.php and lo and behold, the Sections came back.
Hi there,
Yeah that's from here - https://generatepress.com/forums/topic/previous-latest-gpp-version-1-12-3/#post-1756795
glad you found it! Thank you for letting us know. :)
Note: Make sure you add the PHP snippet on a child theme's functions.php and NOT on the parent theme's. It'll get wiped on update if it's in the parent theme's functions.php.
Yep, I added it on the child theme! Many thanks.
Nice one. Glad you go it sorted. :D
Sections was the main reason I use GP. Wow -- need to find a new theme.
solved -- just loaded in an older premium plugin
That's not a good solution.
Please take a look at Tom's reply here:
https://generatepress.com/forums/topic/previous-latest-gpp-version-1-12-3/#post-1754467