Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Can you send me your site URL, please?

    Hi,

    had the same problem, to confirm what my problem was, I re-coded my theme.
    In my theme I moove an elementor div to another position on my page.
    But to do so, you have to give your Main-Div, 2 classes, because else your style from the backend wont be applied.
    class=”elementor elementor-PAGEID”
    I got the pageID with php, in my Header.php and my div class was like this:
    <div class=”elementor elementor-<?php echo $id; ?>”>

    And exactly that caused my error, after i removed both classes the error dissappeared.

    Well my solution was quite simple, instead of php I used Javscript to insert the correct classes.
    On the bottom of my content-page.php (of my active theme)
    i added:

    <script>
    
    //window.onload makes sure, that the side is fully loaded before adding the classes.
    window.onload = function(){
        let id = <?php echo $id ?>;
        document.getElementById("Id_of_main_elementorDiv").classList.add("elementor");
        document.getElementById("Id_of_main_elementorDiv").classList.add("elementor-"+id);
    }
    </script>
    
    

    Edit1: script part more readable
    Edit2: removed error in script-part

    • This reply was modified 1 year, 12 months ago by hendi330.
    • This reply was modified 1 year, 12 months ago by hendi330.

    Hallo,

    thank you, @hendi330. Thank you, but that doesn’t help me.

    Are there any news from the support, @ozyeger ?

    Regards,
    Daniel

    • This reply was modified 1 year, 11 months ago by dafn.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Console error Error: `id` and `element` are required.’ is closed to new replies.