New Blocks not showing in Widget Block Search
- This topic has 6 replies, 2 voices, and was last updated 3 years, 3 months ago by
[email protected].
-
AuthorPosts
-
January 26, 2022 at 2:30 AM #33463
[email protected]
ParticipantI created several blocks a few months ago and they all worked well.
Today I went to create a new block, but it will not show up in the widget block search.
https://ibb.co/YQJQYpGAll older blocks are showing up, and the new block also shows up in the posts/page editor when I search for it. See: Olyweb Quicklink Block shows in the post search.
https://ibb.co/gP6QJpxI have tried duplicating older blocks (changing the name and slug), and they will not register in the widget block search either.
January 26, 2022 at 2:32 AM #33464[email protected]
ParticipantHere is a generated function from MB Builder
function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Olyweb Quicklink Block', 'your-text-domain' ), 'id' => 'olyweb-quicklink-block', 'icon' => 'grid-view', 'category' => 'oly-blocks', 'supports' => [ 'align' => [''], ], 'render_callback' => 'nb_quick_blocks', 'enqueue_assets' => 'olytheme_scripts', 'type' => 'block', 'context' => 'content', 'preview' => [ [ 'on' => '', ], ], 'fields' => [ [ 'name' => __( 'Background Color', 'your-text-domain' ), 'id' => $prefix . 'bg_color', 'type' => 'color', 'alpha_channel' => true, ], [ 'name' => __( 'Font Color', 'your-text-domain' ), 'id' => $prefix . 'font_color', 'type' => 'color', 'alpha_channel' => true, ], [ 'name' => __( 'Blocks', 'your-text-domain' ), 'id' => $prefix . 'quick_blocks', 'type' => 'group', 'collapsible' => true, 'group_title' => '{quick_block_title}', 'clone' => true, 'sort_clone' => true, 'max_clone' => 8, 'fields' => [ [ 'name' => __( 'Image', 'your-text-domain' ), 'id' => $prefix . 'quick_block_img', 'type' => 'single_image', 'image_size' => 'medium', ], [ 'name' => __( 'Title', 'your-text-domain' ), 'id' => $prefix . 'quick_block_title', 'type' => 'text', ], [ 'name' => __( 'URL', 'your-text-domain' ), 'id' => $prefix . 'quick_block_url', 'type' => 'text', 'desc' => __( 'include http://', 'your-text-domain' ), 'placeholder' => __( 'http://site.com', 'your-text-domain' ), ], ], ], ], ]; return $meta_boxes; }
January 26, 2022 at 2:46 AM #33465[email protected]
ParticipantEven tried a simple test block, and it will not show up in the widget search either
$meta_boxes[] = [ 'title' => __( 'Test Block', 'your-text-domain' ), 'id' => 'test-block', 'description' => 'Test', 'icon' => [ 'background' => '#81d742', 'foreground' => '#eeee22', 'src' => 'admin-appearance', ], 'category' => 'text', 'keywords' => ['test'], 'supports' => [ 'align' => [''], ], 'type' => 'block', 'context' => 'content', 'fields' => [ [ 'name' => __( 'Button', 'your-text-domain' ), 'id' => $prefix . 'button_ps918i97tzm', 'type' => 'button', ], ], ];
January 26, 2022 at 2:51 AM #33466[email protected]
ParticipantI think I found that this is some conflict with PUBLISHPRESS BLOCKS Plugin. When deactivated the blocks show up in the widget search.
January 26, 2022 at 3:45 AM #33467[email protected]
ParticipantThe last problem seemed to be that the widget block search only shows a certain amount of blocks.
I did find a new problem. When adding a block made with MB on the Widget Page the MB js/css is not included like file.css/js color.css/js group.css/js .... ect doe
January 26, 2022 at 1:17 PM #33474Long Nguyen
ModeratorHi,
Thanks for your feedback.
The script files of MB Blocks only load on the post editing page. I will inform the development team to support it on the widget editing page.
January 27, 2022 at 1:27 AM #33490[email protected]
ParticipantThanks, Long.
-
AuthorPosts
- You must be logged in to reply to this topic.