Tutorial Blog

How to Add HTML Code in WordPress — Try Embedit

May 9, 2009 by Spencer Spellman · 8 Comments Post to TwitterPost to Yahoo BuzzPost to DiggPost to RedditPost to StumbleUpon




picture-11If 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.

picture-21

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.

picture-12

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.

3

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.



Comments

8 Responses to “How to Add HTML Code in WordPress — Try Embedit”
  1. Webdev - http://webdevelog.com/ says:

    Thank you very much! This is a good trick to prevent Wordpress’ post-formating of the post!

  2. zane - http://www.caseincourt.com/site/ says:

    Had some unprecedented problems with HTML in WordPress… scripting would be on the page and bad formatting by simply copy and pasting html source code directly from my external editor into the WP editor…

    Installed this program and was pleasantly surprised!! Thanks a ton, worked awesome.

    check out my site… http://www.caseincourt.com/site/

Tutorial Blog