How to prevent wordpress from wrapping my javascript in tags -


I have WordPress 3.8.1 site I want to embed this javascript into a script tag in one page

  at EASTBANKRATE, POLICEANDFIRERATE, WESTBANKRATE, calculateTax, calculateTax_Homestead, calculateTax_NoHomestead. EASTBANKRATE = 148.77; Westbanker = 14.96 6;   

I do this like this:

Enter the image </ P> <pre> <code> & lt; p & gt; </ p> <p> But when I click on the preview change (or update -> preview changes), this markup translates EASTBANKRATE, POLICEANDFIRERATE, WESTBANKRATE, calculateTax, calculateTax_Homestead, calculateTax_NoHomestead; </ p> & lt; p & gt; EASTBANKRATE at: </ p> <code> =
WESTBANKRATE = 149.66;

Which definitely gives an error:

 Enter image description here

Is there no way to annotify this javascript as markup? If not, would this JS get the page open without the opening of the wordpress behind it? Is there any way to add?

To prevent you from changing the new code from Wpautop filter must be disabled> & lt; P & gt; tag

  remove_filter ('the_content', 'wpautop'); Remove_filter ('the_excerpt', 'wpautop');   

Another option is to not include any double line breaks in your javascript, although it can be difficult to manage. Officially WordPress recommends referencing external content if you have to include javascript in the post content:.

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -