Hide Oxygen Composite Elements

Marko Krstić
11 Jun 2022

if you do not use it. Keep add elements sidebar clean.

Left Before | Right After

Solution to hide

<?php

    function hide_oxy_composite_elemenets(){
    if (isset ($_GET['ct_builder']) && 'true' === $_GET['ct_builder']) {
        echo '
            <style>
                #oxygen-add-sidebar .oxygen-add-composite-element {
                    display: none;
                }
            </style>
            ';
        }
    }
    add_action('wp_enqueue_scripts', 'hide_oxy_composite_elemenets');

?>

If you are using Scripts Organizer download code snippet

Solution to Disabled

<?php

    remove_action('init', 'run_oxygen_composite_elements');

?>

Thanks to Suppa Mike for providing second solution.

Was this article helpful?

Tags

Categories

Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy