Adding HTML and JavaScript codes to WordPress

Adding HTML and JavaScript codes to WordPress

October 12, 2017 Blog 0
html css javascript wordpress without formating

Adding HTML or JavaScript codes to WordPress can be a pain in the ass. "wpautop" is the integrated function of WordPress, that if you use the text-editor, WordPress will add in several cases a <br> or <p> tag to make text editing easier for writers. However, when you want to insert a full HTML or JavaScript code, WordPress will insert inside your <script> ...your code </script> or HTML code tons of break and paragraph tags, which makes the JavaScript (and sometimes HTML) defective.

Text Editor

The WordPress text editor (default or advanced) has two ways of adding text. With the Visual mode or Text mode. Visual is what you're using 95% of times while creating posts and pages, it makes creating posts very easy since HTML knowledge is not needed. Text is only used if you need to make some changes within the HTML text, where you can edit the source code.

1. Adding HTML code to the Text Editor

The Text editor displays the raw HTML code, which the Visual editor displays as it later will be on the website.

 

2. Custom HTML and JS plugin

After you've acquired a VPN, you need to set it correctly up. Read carefully the installation or setup guide which can be found on each providers website - or if you're lucky, you'll get a software that makes everything really easy. Activate your VPN and choose a location different than your country. Visit this page and see if your current connection is from a different country.

You can use this as a reference:

Your current IP address is: 207.46.13.27
Country: United States

Leave a Reply

Your email address will not be published. Required fields are marked *