get_the_content if it contains multiple lines it results in SyntaxError
It sounds like you are directly echoing the php into a JavaScript variable? get_the_content makes no guarantees that the value it returns will be sanitized in the right way for a JavaScript variable. You might try first encoding the output into JSON, and then doing that, i.e. <script> <?php ob_start(); the_content(); $content = ob_get_clean(); ?> … Read more