Adding HTML Code to Your WordPress Page, Post or Widget

Many WordPress users find it easy to get started because the Visual editor is similar enough to Word that they feel comfortable getting started. But what about those times when you are provided with HTML code to add to your site? If you copy and paste it into the post or page using the Visual editor, it comes out as text, not code. So you lose the functionality of the code, and it ends up looking like this:

<a href="http://bit.ly/OWHS4O">
<img src="http://leadchangegroup.com/wp-content/uploads/2012/08/The-
Character-Based-Leader-197x300.png?84cd58">
</a>

Here’s how to add functioning HTML code to your WordPress page or post.

 

The result will look like this:

 

If you want to add it to the sidebar instead, you have to add a text widget to the sidebar and paste the code in there instead. Here’s how to do that.

If you enjoyed this content, why not
subscribe to the blog so that you don’t miss out on future posts!

The following two tabs change content below.

Tara R. Alemany

Award-winning author and speaker, and owner at Aleweb Social Marketing
Tara Alemany defies a simple definition. She is an award-winning and best-selling author and speaker, as well as a serial entrepreneur. Her publishing company, Emerald Lake Books, benefits experts and thought leaders as they grow their business by taking their words from manuscript to masterpiece. Her consulting company, Aleweb Social Marketing helps authors and speakers to get found online, on-stage and on-the-shelf. In addition to publishing, consulting, writing and speaking, Tara serves on the Boards of Directors for a Christian writers’ critique group, as well as acting as co-president and chaplain of the group. In her spare time, she is a novice winemaker, a martial artist, a juggler, a military Mom to 2 teenagers (one of each), step-Mom to 2 dogs (one of each) and is owned by a black cat.

Comments

  1. Yes, this is very helpful as always.

    In 1999 when we were first designing websites, I took an HTML course. After which I decided, we would do the web Design and work with a professional programmer for all code. And that’s what I still do with my blog(s)and those clients I help get started. Every once in a while I decide I’ll insert that little bit of code myself, and I wish I hadn’t!It’s not as easy as it looks and often way too time consuming for a non-pro!

    • Tara Alemany says:

      Thanks, CASUDI. I agree that adding HTML code can be intimidating and confusing. But my focus is to empower my clients and readers to recognize that, often, don’t give themselves enough credit. With the proper guidance and training, it is possible to try new things. Notice, my emphasis was on the fact that the HTML was being provided to the reader. Receiving it from a reputable source, like a conference organizer, blog syndicator, publisher, etc. and putting them on a WordPress website is easier than it may seem.

      As always, though, we’re here to serve! So, if any of my readers need the additional assistance, they can always hire us. 🙂

  2. Thank you for this. I am not the admin for our WP site at work, but on my own I am doing my blog site in WP. This is helpful!

  3. when I post the code and go back to the visual editor then there is NOTHING there!
    so it just does not work for me in wordpress, been working on this all day trying to embed a stylesaint code into my wordpress post.
    I had no problems doing in on tumblr but no results at all at wordpress.

    ad by the way, when I am to write a post at wordpress it does not say HTML like it does on yours, mine says Text

Speak Your Mind

*

Time limit is exhausted. Please reload CAPTCHA.