A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Fixing Fragmented WordPress HTML

Word Press is a great piece of software, and overall I’m very pleased with it. Those who want to setup a blog can do so with as little or as much involvement as they desire on the coding side of things. Unfortunately, it has a funny bug that leaves (or adds) little pieces of HTML code in a post, and that ends up affecting the rest of the content on the blog.

Though I am placing the blame with Word Press, it may actually lie in TinyMCE the JavaScript editor built into Word Press, or the combination of plug-ins that I have installed. Whatever the cause, I often have to clean up the HTML code in the post in order to keep ThoughtfulConsideration.com looking the way it should.

Generally speaking, the offending code is a “strong /” tag (my Code Escape plug-in isn’t working correctly, or I’d have just written the HTML tag) though it will often mix in an empty pair paragraph tags just to mix it up a little bit. Without a good tool, it could take quite a while to try to identify where the problem is.

Luckily, I came across a great editor. It’s wonderfully functional, and best of all, it’s free! PSPad from PSPad.com will allow you to edit a wide variety of file types, and like virtually every other editor, uses colors to highlight reserved words and code to make editing easier. None of that knocks your socks off, right?

Well, it has a couple of features that are especially helpful for resolving the kind of problem that I’m having with Word Press, and here’s how I use it:

  1. In Word Press, open the post that’s causing the problem and hit the HTML button to view the code.
  2. Cut the code from the browser window.
  3. Open PSPad and create a new HTML file.
  4. Highlight the auto-inserted HTML code (in order to replace it), and paste the code cut from Word Press.
  5. On the menu bar at the top, click HTML –> Reformat HTML Code to make it look nicer and make it easier to edit.
  6. Click HTML –> Check HTML Code (or CTRL + F10) to have it look for problems.
  7. A new pane will appear at the bottom of the window with a list of the problems that it found. Sometimes the messages are a little cryptic, but usually you can figure out what needs to be corrected, especially since it references line numbers.
  8. After correcting the problems, click HTML –> Check HTML Code again to make sure that everything is copacetic.
  9. Copy the code back into Word Press’s HTML window and hit the Update button.

Thank heavens for technology that helps solve the shortcomings of other technology!

Question(s) of the day:

What is the biggest problem that you have faced with your blogging software? Have you really delved into any of the code in order to correct a bug or create new functionality?

11 comments to Fixing Fragmented WordPress HTML

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>