If you have a WordPress blog that you want to make more like a website, then at some point along the line, you’re going to want to add specialized code to it to give it some flare. This may be in the form of advertising, affiliate links, videos and something else. Whatever you want to add, chances are it’s going to require a little snippet of HTML. In this post we’re going to look at how to easily add HTML code to your pages and posts.
Sometimes you may just be able to copy and paste code or write HTML code directly into your posts. To do this, you just need to click the HTML tab at the top of the post and then write or paste the code into your post and publish it.
The code from photo 1 was pasted in the HTML tab and now looks like this.
Although this usually works, sometimes it doesn’t. Anytime you add HTML code into a WordPress post or page there is the potential that it will alter the layout or make undesirable changes that you didn’t intend. To keep this from happening, you can install a WordPress plugin to more reliably embed HTML code without accidentally altering the layout. One such plugin is called EmbedIt.
After installing and activating EmbedIt, you’ll go to the post you want to add html code to. Once the new post is open, you won’t paste the code into the actual post, but you’ll create a custom field. You’ll do this by first typing [HTML1] into the post.
You’ll now scroll down to the custom field box and type HTML1 as the name and then paste the code into the value box.
Now when you publish your post it should appear without making any unnecessary altertions to the formatting or layout. For bloggers that aren’t comfortable diving into hand-code HTML or want to skip unnecessary troubleshooting, Embedit makes inserting HTML advertising, affiliate links and more into a WordPress site relatively painless.