Debugging the Code

My code has gone Perquackey

My code has gone Perquackey

When you download a WordPress theme and open it up, there’s this stuff that explodes in your face and kills you. No, wait…that’s the inside of a golf ball.

What’s inside a WordPress theme is a bunch of little files with the extension .php, except for a file that says “styles.css” and which, if you have any version of Dreamweaver installed on your computer whatsoever, will automatically launch it whether you want it to or not.

The “.php” is what makes a blog a blog and not a static Web site. It’s an interactive scripting language. I have a nodding familiarity with HTML and CSS, having designed sites before, but as far as my knowledge of PHP, I feel like I’m reading Martian folk songs.

In order to get the site up and running with at least a scintilla of that “Personal Branding” that’s so important today, I figured there are two things I basically know how to do:

  1. Change the header picture in the default theme to my banner, and
  2. Tweak the colors through the CSS file to match the blue of my logo.

These things being done, I now have lovely blue headings and half-a-head, which is better than none. Firefox, my fave-rave browser, has a plug-in called Firebug that opens a little window at the bottom of your screen and lets you take a look at the code for that site. This is great if you want to see how somebody built something and you want to…uh…borrow their code, which will inevitably be a Flash file and won’t show anything.

What Firebug is showing me on my site is some code I didn’t write and didn’t remember seeing in any of the little files. For example, the #header has a bunch of lines that start with “Moz,” which I see stands for Mozilla, and it also says:

background: transparent url(Images/banner2.gif) no-repeat scroll center bottom

And what I’d written was:

background: url(‘Images/banner2.gif’) no-repeat bottom center

So, does WordPress rewrite your code? Why would it do that? Or is this a thing that this particular browser does, the way older versions of IE have those weird exceptions?

Another thing is that I have a ghosted “Desktop Icon” at the upper-left-hand corner next to my banner. I selected it and chose “Inspect Element” and saw this in the Firebug screen, under the HTML tab:

<a href=”http://melindabrunonyc.com/>Desktop Icon</a>

I’m going to go out on a limb here and say that this is something that WordPress sticks in there to automatically pull in the name of whatever you’re calling your blog, plus give you a link back to the main page of the blog.

I’ve been asking around if anyone can figure anything out, but most people I know who build Web sites aren’t familiar with PHP and then they look at me like I’m singing Martian folk songs. Besides, I don’t think it’s in the PHP. I think I’m missing something in the CSS that’s overriding what I’ve put there, or missing a piece of CSS code somewhere. Hey, I’m perfect, but it happens.

So I’m putting out there for your feedback: Put on your magic Firebug glasses and take a look. It’s probably something forehead-smackingly simple, except if it’s not.

Leave a comment

3 Comments.

  1. Thanks for the tip, Melinda! Just what I wanted.

  2. Oops – I meant the tip about Firebug. Anyway, I know you already solved your problem.

Leave a Reply


[ Ctrl + Enter ]

Trackbacks and Pingbacks: