Add elementor group Controls to class outside the main elementor class or main Render function

Rate this post

At this time I have the code with Elementor group controls and render function. register_controls works well for classes used in render function. Example code: 'selector' => '{{WRAPPER}} .testsize controls Typography of <h1 class="testsize> because its in the render function, but I have .testsize classes outside the render function (Just HTML pasted in page) and controls are not working for them. Maybe That’s how it should be, but I need to register controls for all .testsize classes, it does not matter classes are used in render() or not, controls must work for all. Can you help me? Thank you

protected function _register_controls() {

                'label' => __( 'Content', 'plugin-name' ),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,

                'name' => 'title_typography',
                'selector' => '{{WRAPPER}} .testsize',


    protected function render() {

        $settings = $this->get_settings_for_display();

        echo '<h1 class="testsize">TEST</h1>';




Easy Fix. Just delete {{WRAPPER}} from 'selector' => '{{WRAPPER}} .testsize', and problem is solved. It’s not usable while live editing but works after saving the progress.

Leave a Reply

Your email address will not be published.

Back to top button