0

I'm trying to use a the js code in the wordpress post (I'm not using visual editor) :

<script type="text/javascript">$(document).ready(function () { codes }</script>

Unfortunately when I want to preview it , it puts it in a paragraph tag.

<p><script type="text/javascript">$(document).ready(function () { codes }</script></p>

There aren't any double line breaks before or after it. I also added remove_filter( 'the_content', 'wpautop' ); to functions.php file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.