Sometimes it can be frustrating when you try to insert advanced (or even basic) HTML code into WordPress pages and posts. Even if you switch the editor over to the Text tab and paste in your code you run the high possibility that when you update the page/post or switch back to visual editing mode that your HTML code will be butchered and not function correctly.
This is very much the case when it comes to Interspire Email Marketer opt-in forms. You can build a form inside of Interspire via the “Forms” menu link at the top right hand side of your user interface.
The best way to ensure that your form code will stay intact and work within your WordPress site is to use another WordPress plugin called “Global Content Blocks.”
This plugin essentially allows you to create blocks of code that can easily be inserted into WordPress pages and posts with a shortcode. The plugin is free and can be found by searching in your “Add New” plugin menu.
Once installed click on “Add Content Block” and give your piece of content a title. The description is optional but could be helpful if you are going to be adding a lot of content blocks in the future. Select the type of code you will be inserting: HTML, Iframe, PHP, etc and then insert the code below in the text editor. In the case of an Interspire Email Marketer opt-in form you should select HTML or just the default generic option. Click save and your code block is saved.
Open the page/post to which you want to add the code block and click the “Global Content Blocks” button shown in the visual editor menu. It looks like three different blocks stacked on each other (red, blue, green). When you click on the button it will open a popup window from which you can select the block of code you want to insert. BAM, that’s it!
Here is a video that is also helpful:
[contentblock id=1 img=gcb.png]