Oxygen integration | WordPress.org

I will look into this. In the meantime, have you tried using the shortcodes (see the Help > Shortcodes page)?

Unfortunately, Oxygen Builder does not support widgets with namespaced classes.

For example:

The WordPress “Text” widget PHP classname is WP_Widget_Text. This classname is not namespaced which is why it works with Oxygen Builder.

The Site Reviews “Recent Reviews” widget PHP classname is GeminiLabs\SiteReviews\Widgets\SiteReviewsWidget which is namespaced.

The Elementor widgets also do not work with Oxygen Builder since they are also namespaced (i.e. ElementorPro\Modules\Library\WP_Widgets\Elementor_Library)

Until Oxygen Builder fixes this, you will have to use the shortcodes. You might also want to contact Oxygen Support and refer them to this support topic.

Even if the widgets did work with Oxygen, I would still recommend you use the shortcodes because the widgets are not as full-featured as the shortcodes and blocks.

If you really want to, you could try adding this custom snippet (with the Code Snippets plugin) which overrides the Oxygen widget list and fixes the namespaced classnames using the addslashes function.

However, this may just be a partial fix and I can’t guarantee that this will work properly.

function override_oxygen_widgets_list() {
    global $oxygen_vsb_components;
    if (oxygen_hide_element_button($oxygen_vsb_components['widget']->options['tag'])) {
        return;
    }
    foreach ($GLOBALS['wp_widget_factory']->widgets as $class => $widget) { ?>
        <div class="oxygen-add-section-element" title="<?= $widget->widget_options['description']; ?>"
            data-searchid="widget_<?= strtolower(preg_replace('/\s+/', '_', sanitize_text_field($widget->name))); ?>"
            ng-click="iframeScope.addWidget('<?= addslashes($class); ?>','<?= $widget->id_base; ?>', '<?= addslashes(html_entity_decode($widget->name, ENT_QUOTES)); ?>')">
            <img src='<?= CT_FW_URI; ?>/toolbar/UI/oxygen-icons/add-icons/widgets.svg' />
            <?= $widget->name; ?>
        </div>
    <?php }
}

add_action('init', function () {
    global $oxygen_vsb_components;
    if (!isset($oxygen_vsb_components['widget'])) {
        return;
    }
    remove_action('ct_toolbar_widgets_folder', [$oxygen_vsb_components['widget'], 'widgets_list']);
    add_action('ct_toolbar_widgets_folder', 'override_oxygen_widgets_list');
});

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Your Advertisement Here