Hello.
I set up a filterable grid and filters are not working.
I saw that the plugin is inserting <p></p> tags in script lines, so I get Sintax error in console (Unexpected token <)
This is the code:
<p> <script>
jQuery(document).ready(function($)
{
$("#post-grid-528 .layer-media .gallery").owlCarousel({</p>
<p> items : 1,
navText : ["",""],
autoplay: true,
loop: true,
autoHeight : true,
nav : false,
dots : false,
})
});</p>
<p> </script><br />
<script>
/*Write your js code here*/
</script> <script>jQuery(window).load(function(){jQuery("#post-grid-528 .grid-items").masonry({isFitWidth: true}); });</script></p></div>
<p> <!-- End .post-grid --></p>
How can I get rid of those <p> thas?
thanks
<p> <script> | |
jQuery(document).ready(function($) | |
{ | |
$("#post-grid-528 .layer-media .gallery").owlCarousel({</p> | |
<p> items : 1, | |
navText : ["",""], | |
autoplay: true, | |
loop: true, | |
autoHeight : true, | |
nav : false, | |
dots : false, | |
}) | |
});</p> | |
<p> </script><br /> | |
<script> | |
/*Write your js code here*/ | |
</script> <script>jQuery(window).load(function(){jQuery("#post-grid-528 .grid-items").masonry({isFitWidth: true}); });</script></p></div> | |
<p> <!-- End .post-grid --></p> |
Welcome to our forum.
this issue is happening because of wpautop function.
please add following code to your theme functions.php and let me know the result.
remove_filter( 'the_content', 'wpautop' );
https://codex.wordpress.org/Function_Reference/wpautop
Regards
Please send me temporary admin.
Regards