PureNews

PureNews is an amazingly sleek and powerful news theme with unlimited color variations.

View full feature list Check out the live demo Buy this theme today

How to Fix 5 Common Theme Problems

Posted by on 30th Sep 2010 | 6 comments

As I mentioned last week, as a blogger, you are going to make mistakes and, fortunately, most of them are very minor ones that you can fix and recover from quickly.

That being said, one of the more common and embarrassing mistakes involves screwing up your theme. This can be especially frustrating if you aren’t somewhat experienced with HTML and CSS, but can still be a headache no matter how experienced you are.

Though there are literally an infinite number of ways you can mess up your theme, limited only by your “imagination” in this area, some errors are definitely more common than others and you can probably fix most of the common mistakes quickly.

With that in mind, here are 5 very common theme/template problems and how to fix them.

I’m Getting An Error that Says ___________

This can be the most frustrating problem as it can mean your site is effectively offline. If your site is throwing back an error, either in addition to or instead of your other content, you need to read the error carefully.

The error will, usually tell you everything you need to know to fix it, including what file the error is in, what line number it is at. If your error says that the problem is in your header.php at line 56, you can be pretty sure that the error is in that file and on, or at least near that line.

Go into that file and look for any obvious formatting errors such as forgetting a bracket, a quote or something else. Be sure to look at the line before it to make sure that it wasn’t a formatting error on that line causing the crash to happen on the one after it.

For help with line numbers, you may want to use a source code editor like Crimson Editor that displays line numbers clearly.

All of the Content After Point X is Formatted Wrong

This can happen either within a post or within a theme, but if after a certain point in the page the rest of the content is formatted wrong, you most likely forgot to close a tag. For example, if you open up an H2 tag bug don’t close it, all of the content below it will appear in that format.

To fix it, simply go to where the error started and see if you failed to close a tag. When you find it, add the closing tag at the correct place.

My Sidebar is Below My Content

This is a common problem where the sidebar or navigation of a site appears below the content portion when it should be beside it. This can be especially annoying as it will happen in certain browsers but not others, sometimes making it a tough problem to track down.

The cause of the problem, usually, is a simple math problem. If your HTML you likely have a DIV for your entire body, including both your content and navbar as well as DIVs for those two areas. If the content area plus the sidebar area plus any padding around them is wider than the main DIV, the sidebar will appear below the content, just like text running over to the next line.

The easiest way to temporarily fix this problem is to simply add a few pixels to the main DIV in your site’s CSS file. However, you’ll likely want to keep working at this one to make sure it lines up perfectly in all browsers.

A Function Isn’t Found

This is a specific type of error that is common after disabling a plugin where your site doesn’t load and generates an error saying that a function can not be found. Though WordPress makes it easy to code around this by using the function_exists check, many plugins don’t ask for that when telling users to copy and paste code into their theme.

You can fix this by either removing the line of code that calls the plugin, which should be identified in the error, or reactivating the plugin.

Something Is Causing Loading to Hang

This one might not even be an obvious problem at first but you may notice that your site never really finishes loading or, in extreme circumstances, will hang up in mid-load for a lengthy period of time. This is an annoying problem and, usually, is not one you caused directly.

What is going on is some element, likely from a 3rd party, is loading slowly or not loading at all, holding up your site while your browser either grabs it or gives up.

The easiest way to figure this out is to load your site and watch the bottom of your browser to see what the problem is. If that fails, use Pingdom’s Load Test Tool to see what item is causing your site to come up so slowly. Remove the problem, at least temporarily and your site should fly just fine..

Bottom Line

Template and other coding errors are why it pays dividends for a blogger to know HTML and CSS. If you can’t fix small problems with your theme or make minor adjustments, you are at the mercy of your visual tools and those who are willing to help you.

Fortunately, you don’t need a lot of expertise, just enough to make these kinds of adjustments. This is not computer programming and it doesn’t require any truly special skills, virtually anyone who can use a word processor can learn HTML easily with a bit of work.

Once you have that, problems like these go from being major panics to simple problems that take only a few seconds to fix.


6 comments - Leave a reply
  • Posted by العاب فلاش on 1st Oct 2010

    Thank you
    My recent post العاب فلاش – لعبة حلاق الحارة

  • Posted by EAT Club on 2nd Oct 2010

    Another common issue I have is compatibility with all the commonly used browsers! It's shocking how different things can look on IE when it looks perfect on Firefox.

  • Posted by DomainS on 3rd Oct 2010

    The side bar not only shows below, but many times, only on posts but not on the home page… making it hard to detect….
    My recent post List of 1300 Back Links- ranging from PR0 to PR9

  • Posted by Trader on 3rd Oct 2010

    I believe that bloggers must have at least some talent programming, otherwise, they should lower their ambitions.
    My recent post Succesful Trades with the Delphi Scalper

  • Posted by Philosophy Blog on 7th Oct 2010

    My blog loads quite slowly, which is annoying. I think that it is as you said under you "Something Is Causing Loading to Hang" point that it is too many external things loading. My other (non WordPress) powered blogs run much smother.

    Thanks for saying about the Pingdom load speed tool, its really useful in seeing what I need to reduce. Turns out that it is probably too many images which are not very well optimised. I have nearly half a megabyte of images!

    I am going to try and speed this up now, so thanks for the article, it was really helpful :)
    My recent post Prioritise the things in your life

  • Posted by Ray Ban sunglasses on 7th Oct 2010

    There are some fixes for Theme Problems. … In General tab, ensure that "Show common tasks in folders" checkbox is checked under Tasks section. …. Sunday, February 01, 2009 5:32 AM. Well i found a windows vista theme.