Some custom widgets disappear when dragged into the content area

When I drag some of my custom widgets into the content area - they “pop” rather than “drop”.

Please refer me to the documentation for the following:

  1. Filter hook to exclude some widgets from the list of widgets displayed on the right hand side of the screen

  2. How to make a Custom widget “Beaver build ready”

Environment: Using Beaver Standard edition with Genesis framework. Plugin that provides the custom widgets that are failing is Genesis Club Lite.

Thanks in advance

Hey Elizabeth,

Welcome to the BB forums! More often than not, the reason why widgets do that is because of a JS error. Do you think you can send temp admin access to the site so we can check? You can use the private reply option below.

I’ve assigned another member of the team who can assist you further on the other 2 questions.

Ben

Many Thanks for your help, Ben.

Starting with the Javascript error I was able to track down the issue, and now the widgets are appearing okay.

The remaining small issue is that the widget uses tooltips which require a stylesheet file tooltip.css.

In the WordPress editor this is queued at the hook “admin_enqueue_scripts”

What is the a Beaver Builder hook I can use to enqueue the tooltip stylesheet.

Thanks in advabced

Hey Elizabeth,

That’s great! Okay, so the Page Builder runs on the frontend so we’ll want to hook that into wp_enqueue_scripts instead. Let us know how that goes! :slight_smile:

Ben

Thanks Ben,

However I don’t want to add the tooltip stylesheet on every page on the front-end, just those when the Beaver Builder Editor is running.

I would like the name of a Beaver Builder Editor initialization hook that runs earlier than the wp_enqueue_scripts hook

For example, my code would be something like this:

add_action(‘fl_builder_editor_init’, ‘abc_enqueue_tooltips’);

function abc_enqueue_tooltips() {
add_action(‘wp_enqueue_scripts’,‘abc_tooltip_styles’);
}

function abc_tooltip_styles() {
wp_enqueue_style(‘abc-tooltip-styles’);
}

If there is no suitable hook I can probably just check the querystring for ?fl_builder

Please advise

Thanks in advance

Hi Elizabeth,

We don’t have a hook for that, but you can use a core builder method to check if it’s active. That works like this…

function abc_enqueue_tooltips() {
    if ( FLBuilderModel::is_builder_active() ) {
        // Enqueue here.
    }
}

add_action( 'wp_enqueue_scripts','abc_tooltip_styles' );

Let me know if you have any questions about that.

Justin

Thanks. That’s perfect!