Archived topic
section not working anymore on CPT page
11 replies · Started by jasond on May 4, 2020
Hello
I have enabled sections by adding snippets into functions.php and it worked well before. Now it's not working anymore. Is there any reason for this?
Thanks a lot
Hi there,
there has been no update to effect that code. Do you have the Sidebar enabled for that page ?
Thanks for your reply. No, I don't have any sidebars. I even created an Element layout to disable the sidebar.
It worked well before although. Can I send you the login so you can have a look?
Thanks
Sorry i sent the wrong reply....
Is your GP Premium plugin up to date ?
We patched a bug that the latest WP update introduced where the 'classic' editor gets displayed on posts / pages with Sections. You should still be able to access the Sections if you scroll down in the editor. Let me know.
Yes, GP Premium latest version, but strange that it didn't work on any CPT page anymore
Hi there,
Looks like you've set this as resolved - did you get it working?
Thanks!
i'm sorry but it is still not working. Can I email you my site details?
Thanks again
Try this:
add_filter( 'generate_sections_post_types', function( $types ) {
$types[] = 'your-cpt';
return $types;
} );
Please refrain from setting un-resolved topics to "resolved".
Thanks!
Thanks, Tom but it is still not working!
Did you change the your-cpt to your CPT slug in this line: $types[] = 'your-cpt';
yes i did but still no luck
Can you disable all of your other custom functions to make sure there are no conflicts?
That seems to be the problem with your other post.