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.