Join our new community forum for support & discussion

Join Now

Home Support Themes RentalHive Add block widgets to RentalHive theme

Add block widgets to RentalHive theme

  • Author
    Posts
  • sowickesited

    I added add_filter( 'use_widgets_block_editor', '__return_true' ); to my child theme functions.php file but I still don’t have access to the new WordPress block widget editor.

    I’m running WP 5.9.1 using the RentalHive theme

    Any suggestions on how to enable the block widgets?

    https://make.wordpress.org/core/2021/06/29/block-based-widgets-editor-in-wordpress-5-8/

    ihor developer

    Please try this code snippet instead:

    add_filter( 'gutenberg_use_widgets_block_editor', '__return_true', 1000 );
    add_filter( 'use_widgets_block_editor', '__return_true', 1000 );
    sowickesited

    Thanks @ihor. That enabled the block editor, but now an error message appears at the top of my wp-admin page.

    “Notice: wp_enqueue_script() was called incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.) in /wordpress/wp-includes/functions.php on line 5768″

    It seems like I can still edit widgets, but everything on the page loads very slowly. Sometimes I have to refresh the page to get stuff to completely load.

    ihor developer

    I guess there’s a conflict with one of the theme scripts, please try the solutions from this topic https://wordpress.org/support/topic/error-in-widgets-with-new-wordpress-version-5-8-wp_enqueue_script-and-wp/ We’ll also add support for the block editor for widgets in future updates.

Viewing 4 posts - 1 through 4 (of 4 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.