Occasionally I get an email from a client I have set up a WordPress blog for or have come across a WordPress blog that looks completely, well just all messed up. There is also probably a blog post every other day on the official WordPress forum titled “My WordPress blog is broken and I don’t know what to do!”
No worries, this WordPress guide will cover some of the most common reasons why your blog is broken and how to fix it and not do it again. The point is to learn from mistakes and if this issue happens again, you already know how to fix it or can even help your friends out fixing their blog.
Broken WordPress Blog – WordPress Issue #1:
The most common problem is the sidebar is pushed down below the posts on the main index page. Usually, this is a result of bad HTML code, an open HTML tag or formatting from a website or MS Word within a post. Just how does this bad code get into a post you ask? Well, usually it comes from copying something from an existing website and pasting it into the Visual editor when creating a new WordPress blog post. It can also happen if you write your post in a program like MS Word and paste it into the visual editor when creating a post.
Pasting from a website or MS Word will retain the formatting of the page and bring in all the other HTML elements and even scripts that you can’t see. To check for unwanted HTML and scripts in a WordPress blog post, click the HTML or Code editor on the top of the edit post box and look for any unwanted HTML or formatting.
To eliminate this possibility altogether, paste any copied text into the HTML or Code editor instead of the Visual editor. Then you can click back to the Visual editor to format the post to your liking. This will not bring in any HTML, scripts or format into your new blog post.
Common WordPress Issue #2:
One very important thing to consider when using HTML or scripts within a post or editing or customizing the themes templates files is to make sure you close all HTML or PHP tags. Open code tags will wreak havoc on a WordPress blog, or any website for that matter. The most common problem I see is people placing scripts like AdSense or banner ads into a new sidebar text widget. The ads can be too big, or again code tags are not closed, causing everything under the bad code to become misaligned or pushed off the themes border.
Example of a banner image code copied wrong. I need to fix that before saving it as that will codes strange things in the sidebar and now completely show that image in the text block.
Common WordPress Problem #3:
Another cause for issues is placing autoresponder opt-in code on the sidebar. This can be tricky to get it to fit. If you are going to do this be sure to check your blog in as many different browsers as possible. If it is too wide for the sidebar or if you leave a tag open it can really screw up your blog.
Remember when making any new posts view your blog to make sure there are no errors or problems. Also if you are going to customize WordPress by editing the theme’s template files create a backup of the file first and check the site with each change.
- Up Next To Read: Best Practices To Write a WordPress Post With Full Optimization
If you have any questions, submit them to our Ask Jaz page. I will be more than willing to help you.