The Secret to Modifying, Debugging Your Blog and other Technical Issues

January 6th, 2008 by Blog Bloke | 37 Comments

The Secret to Modifying, Debugging Your Blog and other Technical Issues

I get a lot of questions about how I did this and that, especially when it comes to template tweaking and other technical things. So I thought I would let you all in on a little secret. When you are trying something new, don’t reinvent the wheel.

I started my computing career as a programmer back in the days when there was no such thing as a desktop, and computers filled up entire rooms (i.e. mainframes). Believe me when I say that I was not a naturally gifted programmer and I found it very difficult at first, until I learned the secret.

Programming is much like writing. Everyone has been influenced by someone else one way or another, and you start with writing the easy stuff and working your way up. (The blogosphere is no exception, or should I say the worst offender where so many bloggers are reiterating what someone else has already said. But I digress.)

The point that I’m trying to make is in the case of Wordpress there are literally thousands of theme/templates available for you to choose from. So my advice is — do NOT try to create your own theme from scratch. Find a theme that you can work with and has features that you are looking for, and then modify it.

Learn to Step Backwards 

If you don’t know how to change something or how it works, then deconstruct the template. OR in other words, reverse-engineer it. Use that handy ctrl-f (find command) in your browser and search for the code you are looking for. See how they did it. Chances are you will be able to figure out how to modify it according to your own needs.

Baby Steps, Baby

If you should get into trouble – backtrack. What I mean by that is take things a step at-a-time. Try something, then test it. Try something else, then test it again. Little baby steps, and save your changes that worked onto your desktop as a file.

If it works then move on to the next step, but don’t make big sweeping changes all at once. So if you should find yourself in trouble (and you will) then it’s simply a matter of reversing that last change you made (i.e. pasting back that last copy you saved). That way you won’t lose all of the progress you’ve made so far.

The same goes for your plugins. Just today I was able to fix my “Top Commenters” plugin. The reason it wasn’t working properly was because it was trying to make an ordered list. Well, for some reason that wasn’t compatible with my template, so I just removed the < li > tag from the code and oilla. It works now! I also think it looks better this way and takes up less space in my sidebar. Bonus! 

It’s really that easy! That’s how I do it and I’m by no means a programming guru. There are much more gifted coders out there than me.

Here’s another example. Just recently a reader asked me how to modify the part of the comments section where it invites your readers to leave a comment. In my case it says “Leave a Reply“. Logically, that part of the code should reside in the theme comments file. A simple search for “Leave a Reply” came up with this:

if (’open’ == $post->comment_status) : ?>
  <h3 id=”respond”>Leave a Reply</h3>

So all you have to do is change the “Leave a Reply” part. Easy peasy!

Don’t Rely Too Much on Plugins 

One of the benefits of using Wordpress is there are tons of plugins that can do the work for you. BUT heed this warning — if you add too many plugins it can slow down your blog, especially the ones that filter your database.

So it is to your benefit to become familiar with your theme/template and learn how to hard-code your modifications rather than just relying on plugins to do it for you. The more familiar you become with your code the easier it will be to change it. The more you can change it, the more power you will have over your blogging destiny.

After all, isn’t that the reason why you chose Wordpress in the first place? So don’t be afraid to learn and stretch yourself. As long as you make regular backups of your code you can always revert it back again.

In my case the transition to Wordpress is almost complete. There’s always little tweaks here and there that pop-up, but all in all it’s about 90% done. Of course, I still have to point my internal links back to this blog, but I think I have a fix for that and I will make an attempt at it sometime this week.

Ok, now here is your chance to request a post. Just tell me what you would like me to write about, and if I should decide to take your challenge I will give you an honourable mention with a link to your blog.

You can’t beat that. You win two ways — you get your answer and a link to boot. Cool.

I’m waiting … tick, tock…

What now? If you like this post:

Leave a Comment and join the conversation..

blog tip with your friends if you liked it

Subscribe to the RSS Newsfeed for more Blog Tips!

Related Blog Tips @ Blog Bloke:

Leave a Comment here.. Ok Blokesters, it's your turn to tell me what you think, ask a question or suggest a blog tip. Don't forget the comments policy and thanks for reading.

37 Responses so far to “The Secret to Modifying, Debugging Your Blog and other Technical Issues”

  1. Good explanation, BB. I might just reiterate the part about making changes in small increments. Despite past experience that tells me otherwise, I tend to get over confident and make big changes. Almost every time, that leads to problems.

    The other part of that is to ALWAYS back up anything that you’re getting ready to make changes to. Trust me when I say that if you don’t you’ll be sorry.

    [Reply to this comment: The author will be notified.]

  2. Thanks for this post, Blog Bloke! After making a transition from Blogger to Wordpress, I can really empathize with your hints here. Small baby steps, that’s so right when tweaking your template!

    Glad to see you’ve found a way to change all those backlinks now :)

    [Reply to this comment: The author will be notified.]

  3. I have been messing around with a few templates on some of my WordPress blogs and it’s a real learning experience.

    I worked on a blog and had it doing and viewing just the way I wanted it but I had not even looked at it in Internet Explorer as I use FireFox almost exclusively. What a huge mess and I mean huge, all the fonts were huge and out of place. That put me into a talespin for a few days fixing that mess. :)

    So it’s good advice ‘not to forget’ using more than one browser to view your work results.

    One of the first things I modify when I have a new template is the ‘Home’ link. I immediately change it to a keyword phrase such as ‘Make Money Online Home’.

    Thanks for the great post. It made me think of more things I want to do and learn about templates because eventually it would be fun to create one from scratch.

    [Reply to this comment: The author will be notified.]

  4. Amanda, when I wrote that I couldn’t help but think of the movie “What About Bob” with Bill Murray and Richard Dreyfuss.

    [Reply to this comment: The author will be notified.]

  5. That’s a good point and something I forget myself James. Just when I think I got it right, days later I happen to look at it in another browser and it’s embarrassing. What a mess, and so it’s back to the drawing board again.

    I guess I’d better fire up that other browser while I think of it…

    [Reply to this comment: The author will be notified.]

  6. Bloke! I found out where to change the word “comments” that appears at the bottom of my posts, following the number of readers who left a comment.

    I viewed the page source information and saw right where the code needed to be changed. Actually I found other information that surrounded the word “comments”, so when I poked around my other php files, I could identify which one needed changing.

    Turns out it wasn’t comments.php that held the code. It was index.php.

    Kathy’s a happy camper! So this article is true. Backup your file before working on it. Make small changes. Test. Undo if you need to. And there’ll be no crying.

    [Reply to this comment: The author will be notified.]

  7. James and Lee both make very good observations especially regarding cross browser compatibility. I only ever fire up IE these days just to see how something looks. I can’t remember the last time I actively used IE to browse.

    I’ve got tons of WP themes on my computer. The vast majority of them I’ll never use but I’ve kept them because the author has done one thing in the theme that I really like. It might be the way they format their comments. It could be a dynamic navigation system. There’s something in there which I might consider using in later themes.

    As you suggest, BB. Why reinvent the wheel?

    [Reply to this comment: The author will be notified.]

  8. That’s great Kathy. Every theme of course will be designed differently. In mine it’s in the comments file. That’s why it’s very difficult for someone else to offer help without actually seeing your code. Sometimes it can take a little snooping around amongst the various theme files to find what you’re looking for, and that handy ctrl-f key can be your best friend.

    [Reply to this comment: The author will be notified.]

  9. Hi Mike. I’m starting to do the same thing. There will always be design features in other themes that you might like, and you can easily deconstruct the code and incorporate the various parts into your own theme. I’m sure theme designers do it all the time.

    [Reply to this comment: The author will be notified.]

  10. Thanks for the helpful hints,

    If I mess with the code, I copy and paste the unchanged code to notepad. Just in case I mess up!

    Speaking of backing up wordpress, may I request a post of the Blog Bloke’s way of backing up database and files. I did a Dbase and core back up but still don’t know if what I did was right.

    [Reply to this comment: The author will be notified.]

  11. Great advice as always but having to be careful about the amount of plugins is something I will find hard to do. I have progressed from being a Blogger widget junkie to Wordpress plugin junkie - I can’t resist trying things out.

    [Reply to this comment: The author will be notified.]

  12. Ditto. Now if only I could get myself follow my own advice ;-)

    Sue, you haven’t yet responded to my offer to write for Blog Bloke dot com.

    [Reply to this comment: The author will be notified.]

  13. Hello,

    What can I do to make this 100% width with 1024×768 screen?

    Thx

    gofree’s last blog post..Flash Banner Creator

    [Reply to this comment: The author will be notified.]

    I took a look at your blog and it fits 1024×768 perfectly. I see your Custom Domain is working fine as well.

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on May 7th, 2008 1:26 pm:

  14. Wow, I didn’t expect that quick respond!!! Yes, now the domain works, but still I can see bar; and if you have a closer look at the button that I put mouse over, it is wrong.

    Here is the image: img390.imageshack.us/img390/1275/clipboardimage1qd6.jpg

    Thx

    gofree’s last blog post..Dezzain Free WordPress Theme - Box Tube

    [Reply to this comment: The author will be notified.]

    The image you refer to didn’t work for me. So it looks like it is an issue with HTML and your image host. But at least your URL is working now. One step at a time ;-)

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on May 8th, 2008 11:38 am:

  15. nice job.

    Benbego Rizki’s last blog post..Kwikcontent VS Adsense Money Maker

    [Reply to this comment: The author will be notified.]

    Thanks Benbego Rizki

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on June 9th, 2008 10:17 am:

  16. I am new here and looking to have a great time and learning experience
    within your community.

    [Reply to this comment: The author will be notified.]

    Welcome fwboodol

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on June 9th, 2008 10:16 am:

  17. Baby steps is how its done indeed. Or as I like to call it, proper trouble shooting ! People tend to change too many things at once and then wonder where they went wrong. If you go that route, it will take you longer to find the problem then the time you saved by slamming everything on there in a 5 minute rush !
    Keep blogging bloke :)
    Blog Walkers last blog post…http://www.mypageofmanythings.com/content/view/82/

    [Reply to this comment: The author will be notified.]

    I just went through it again this evening. I published a post and my template blew apart! So I backtracked a little bit. Baby steps…

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on December 2nd, 2008 4:40 am:

  18. I want more technics for my blog, this step is good for me. Thanks

    [Reply to this comment: The author will be notified.]

    You are most welcome.

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on February 23rd, 2009 3:56 pm:

  19. Thanks for great information.

    [Reply to this comment: The author will be notified.]

    You’re welcome Nancy and thanks for saying so. Please drop by again.

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on February 28th, 2009 4:44 pm:

  20. I wouldn’t see it ever anyways thanks

    [Reply to this comment: The author will be notified.]

  21. very informative and useful!

    [Reply to this comment: The author will be notified.]

    Thanks.

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on March 3rd, 2009 8:14 pm:

  22. Thanx a lot! This is very useful.

    [Reply to this comment: The author will be notified.]

    Thanks Bob.

    [Reply to this comment: The author will be notified.]

    Blog Bloke reply on March 3rd, 2009 8:13 pm:

  23. great post. i’ll try it now.

    [Reply to this comment: The author will be notified.]

  24. Thank you for your information.

    [Reply to this comment: The author will be notified.]

  25. This is a great post. Thanks for sharing.

    [Reply to this comment: The author will be notified.]

  26. […] first post that caught my attention this morning was from BlogBloke’s Blog. BB’s post about the secret of modifying or debugging your blog template brought to mind my […]

  27. Here is a list of 100 sites using the CommentLuv plugin. Post a comment on these blogs and you get a follow link to your latest blog post.

    If you want to try it out just post a comment to this post!

    http://www.blogbloke.com/the-secret-to-debugging-your-blog-and-other-assorted-technical-issues/

Leave a Comment and Join the Conversation...

Subscribe to Better Blog Tips and the New Media Newsfeed Subscribe to comments for this post by RSS | TrackBack URL

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

I love comments and I'm looking forward to reading yours. Thanks for dropping by and don't forget to Subscribe to the Blog Newsfeed Subscribe to Better Blog Tips and the New Media Newsfeed