Excluding WordPress Widgets from Page Builder Panel

WordPress Widgets are listing under WordPress Widgets category at page builder panel. You are willing to

1. remove the non beaver compatible widgets
2. hide for specific user like your client
3. hide for specific user roles (capabilities like editor, author, contributor etc)

In this article I am sharing the small PHP snippet how you will exclude or remove some widgets from existing lists. As an example I am removing the Calendar, RSS and Tag Cloud WordPress widgets. I am sharing the three possibilities. You will use them as per your requirements. You will add the following PHP snippets at your theme’s functions.php file or plugin’s file.

Excluding WordPress Widgets

Excluding for All Users

Excluding for Specific User Role

Assuming that you will disable the some widgets for Editor role users. Here is the snippets for it:

Excluding for Specific user

Assuming that you will disable the some widgets for user ID 5. You will try this PHP snippets

Latest Beaver Builder plugin have an new filter fl_get_wp_widgets_exclude. You will return the widget class name as an array variable with this filter. Above example I am sending three class names: WP_Widget_Calendar, WP_Widget_RSS and WP_Widget_Tag_Cloud.

Leave a Comment

You must be logged in to post a comment.


Get free weekly PRO Beaver Builder Tutorials