Archived topic
GenerateBlocks (container, button, headline etc..) not showing in post editor
8 replies · Started by Dan on November 24, 2021
Hi
When editing a page I can use the GB blocks. But when creating a new post they don't show up in the block options.
This just happens with the 'Post' post type, not on pages or other CPT's
This is the error: https://www.dropbox.com/s/heu9h8hc9o47txa/GB-missing.jpg?dl=0
Any suggestions?
Thanks,
Dan
Hi there,
well thats definitely not normal.
Have you checked for plugin conflicts or any custom functions/hooks that may be interefering ?
I'm using the Mason site, didn't add anything out of the usual.
They do work on CPT and pages, just not on 'post' posts.
Only script added was Google Analytics
would access to wp-admin help?
For sure - we can take a look at the backend.
thanks.
Attached private info.
Site is on staging.
Dan
What happens if you disable the Child Theme ?
it brings back the GB blocks.
There was a function that called a JS which disabled GB in the post post type:
add_action( 'enqueue_block_editor_assets', 'gpc_gutenberg_scripts' );
function gpc_gutenberg_scripts() {
// Load editor scripts for all post types
wp_enqueue_script( 'gpc-editor', get_stylesheet_directory_uri() . '/admin/js/editor.js', array( 'wp-blocks', 'wp-dom' ), GPC_VERSION, true );
// Load editor scripts for specific post types
global $current_screen;
if ( $current_screen->post_type == 'post' ) {
wp_enqueue_script( 'gpc-editor-post', get_stylesheet_directory_uri() . '/admin/js/editor-post.js', array( 'wp-blocks', 'wp-dom' ), GPC_VERSION, true );
}
}
Thanks David for pointing me in that direction.
Dan
You're welcome