How To Tweak Your Wordpress Theme On The Fly
Sometimes you want to tweak your Wordpress theme a bit.
Adding extra or new graphics with different dimensions, changing the templates, a bit of extra search engine optimization, replacing a specific part or maybe installing a better solution for something you’re using now… whatever.
I’m not talking about adding a widget or activating a plugin. That’s easy. As is changing a color or font which you can do in your CSS (which you also can test before implementing, read on).
No, I’m talking about changes that are more drastic and need to be tested before implementing them.
I did one recently. I replaced my sign up form at the top left in the sidebar from a 1 column form to a 2 column width. THAT is a risky theme change, because the CSS didn’t allow me to use the full width of the 2 columns, so I had to change it drastically and test if to see if it worked out ok.
Now, lots of people don’t do that, because it’s too hazardous. The thought of messing up a smoothly running theme and not being able to recover it is enough to abandon any plans in that direction.
Not me though.
I tweak my Wordpress themes on the fly!
I’m going to explain how I do that below, but first let me emphasize that another method is just to announce changes in themes and warn your visitors that there may be some downtime at your blog.
In ClickNewz Updates 5/23/08 Lynn Terry shows you exactly how to do that.
So, here’s how I tweak my theme on the fly.
First, load the page you want to tweak in your browser and then save it on a temporary directory on your hard disk. Next, save the CSS file in that same directory. You can either find the URL of the CSS file in the source, but you can also copy it from your theme directory.
I always create an extra copy so that I have the originals available in case I mess up.
The first thing you have to do now is go back to the source of the page in your temporary directory and delete the full URL to the CSS file, since that one is in that same directory now.
So anything that looks like
http://www.domain.com/wp-content/themes/themename/style.css
must be changed in just
style.css
Now you can work with both the page and the CSS file in that temporary directory. And that’s exactly what we’re going to do.
But before making any changes, take a notepad to write down what changes you’re going to make, ok?
Now you can make your tweaks (and write them down!) locally on your hard disk, using your favorite editor. If you want to see the results, just click on the local page and it will pop up in your browser.
I’m using Firefox and I suggest you do that too -more on that in a minute-, but you also have to check if your tweaks look all right in other browsers too.
I prefer Firefox for several reasons, but for this purpose here’s the main one: you can install powerful “add-on’s” and one of them that we’re going to use here is Web Developer.
Because, in Web Developer we can change the HTML of any page online, without changing the source!
You just select ‘Miscellaneous’ from the toolbar and then click on ‘Change HTML’.
A sidebar pops up where you can change the HTML source and see the effects immediately.
Web Developer allows you to do exactly the same with the CSS (just click CSS and then ‘Edit CSS’ in the toolbar), simultaneous with changing HTML. It uses the same sidebar and you can switch between HTML and CSS.
Now, you DID write down the tweaks you’ve made to your local files, didn’t you? If so, then use these notes to make the same changes ‘on the fly’ using the sidebar of Web Developer!
You can see the effects immediately and tweak some more if you don’t like them. Meanwhile, your current Wordpress theme is still up and running!
If you like what you see and want to implement your tweaks, you first want to save a copy of the theme files you are going to change. I always add something like ‘original’ to the file name and save it.
So, the sidebar.php file for instance then would be saved as ’sidebar-original.php’. It’s important that you do this for the next step.
Now you can apply your tweaks - like in the example above in sidebar.php. Save it on your hard drive and make an extra copy of it, adding ‘new’ to the name, like sidebar-new.php.
Before uploading sidebar.php, open a new browser window showing the (part of the) page you are about to upload. Since I use Firefox, I do the same in IE Explorer to see if my tweaks look the same in there (and many times they don’t since IE Explorer render pages differently!).
Now you have to be quick.
Upload the tweaked page and CSS file, quickly reload the page in Firefox and IE Explorer and immediately replace the files you’ve just uploaded by the ones you saved as ‘original’, so ’sidebar-original.php’ now becomes sidebar.php and ’style-original.css’ becomes style.css again. Upload these files, and everything looks back to normal, as it was.
If necessary, re-read that again. You can do it in 10 to 20 seconds, 30 at the most. Hardly anyone will notice, certainly if you’re using your statistics to see what hours are quite and do this in that time frame.
But YOU now have the tweaked page in your browser window!
So you can check and double check. If necessary, you can repeat this process. If it’s like you want, just save the ‘new’ file as the one you want to upload (like ’sidebar-new.php as sidebar.php) and put it on your server.
Thus you will have tweaked your Wordpress theme on the fly, like I did.
So, what do you think?
Nice or too complicated?
Post your comments below.
Welcome to Affordable Internet Marketing Blog.
You may want to Subscribe to my Updates or to my RSS feed. Thanks for visiting!
Related Articles:
- Wordpress Backup And Database Optimizer Plugin
- Wordpress Automatic Upgrade Plugin
- What Do You Want From A Wordpress Theme?
- Wordpress Search Engine Optimization
- Cascading Style Sheets (CSS) Tutorial
FORWARD:
Email This Post To A Friend



















May 27th, 2008 at 9:55 am
GREAT post! I can always rely on you to provide extrememly helpful information! I was actually just trying to alter my Wordpress theme and was unable to find a clear, solid resource.. So I am so glad I came across yours! Thanks so much!
May 27th, 2008 at 10:48 am
Hey Case…. I’m even more daring than you. I save a backup, and then just tweak and upload files as I tweak. I’ll edit, upload in filezilla, tweak, upload, until it looks right. Several times I’ve busted the theme. But Wordpress quite often defaults back to the classic theme, so at least people get to see something.
I like your method better. Web Developer makes it SO easy to edit CSS. Being able to view the outlines of your “div” tags is very helpful.
May 27th, 2008 at 10:51 am
Excellent! I’ve been looking for clear instructions for fine-tuning my WordPress theme.
I’m bookmarking this for later use, and I had to stumble it was well.
Sandra
May 27th, 2008 at 11:02 am
Good to see this is of some help guys.
Thanks for posting.
Holy Cow Tom, you’ve got… guts!
Thanks for the stumble Sandra!
May 27th, 2008 at 12:04 pm
Well, since you’re talking about Wordpress, I use a plugin called Theme Test Drive. With this plugin I can edit the new theme and it will only be displayed to the admin, regular user will see your default theme. It’s more suitable for very large changes, but can be used to minor tweaks in your current theme, just create a copy of the theme in the themes directory and rename it.
URL Theme Test Drive: http://wordpress.org/extend/plugins/theme-test-drive/#post-2934
May 27th, 2008 at 12:37 pm
I think it looks better now..
Btw. I’m quite new to css and I have those annoying black lines on my blog, between the widgets on the sidebars. How could I remove them?
Thanks,
Eerik
May 27th, 2008 at 2:02 pm
Thanks for this tip, Case. Much better than just monkeying with the theme blind - as I’ve done in the past!
May 27th, 2008 at 2:49 pm
Wow awesome tips. If i knew this when I started my blog i’d be making a lot more. Great tips all around!
May 27th, 2008 at 4:26 pm
I have Web Dev. toolbar installed, but I rarely use it after I discovered Firebug for Firefox. I think it’s the best web development addon/plugin you will ever find.
I do the same, i save the HTML copy of the page and the CSS on my local machine. Then I open my code editor for CSS and HTML (if needed). Then I run the editing page in my Firefox with the Firebug enabled and look where I need to make my adjustments. Firebug allows to make HTML and CSS changes on the fly without changing the actual code, but instead of making notes - I’m writing my changes directly in the CSS/HTML editor, which I have opened at all times.
Lookup the Firebug, I bet you won’t be able to live without it after you try it
May 27th, 2008 at 7:12 pm
What an excellent and informative post. With the information in this post, I can now simply make changes to my wordpress theme without any fair or help.
May 27th, 2008 at 7:48 pm
Yes, Firebug is even better than Web Developer, but to me it seems a bit more complex and intimidating for beginners and takes more memory of your PC.
Still, if you can handle it, Firebug is the way to go. Download your copy at
https://addons.mozilla.org/en-US/firefox/addon/1843
May 28th, 2008 at 3:20 pm
That’s pretty useful actually. I usually end up flipping my blog upside down and inside out when I make even the most minor changes.
May 28th, 2008 at 9:58 pm
Great post!
I just recently learned that CSS means Cascading Style Sheet. I knew it was where you change colors and fonts, but I have little idea how to do it. I’ve managed to change the link color to the default blue everybody recognizes on one of my blogs, but that’s as far as I’ve wanted to go. Sometimes installing a plug-in can be a hair-pulling challenge. The last computer class I ever took was assembly language programming 25 years ago in college. What is used today is like the difference between a campfire and a JenAire. I know how to light a campfire several different ways, but I can’t figure out how to turn on my sister’s high-tech oven!
I’m currently reading “WordPress for Dummies” and found out there is a “CSS for Dummies”, “PHP for Dummies”, and “HTML for Dummies” though there seems to be lots of free tutorials for HTML.
A soon as I submit this, I’m reading your CSS tutorial!
Thanks for all the tips,
Sherri
May 29th, 2008 at 4:20 am
Thyanks a lot for this Case. i’m intending to make some changes to my blog template over the next month so this is very timely.
One thing I also do is keep a copy of all my CSS files in a folder as an insurance policy.
May 29th, 2008 at 11:06 am
The article was alittle long but you used our words to keep the instructions clear.Lots of good feed back from this information.Keep sharing Thanks.
May 29th, 2008 at 9:55 pm
Hi Case, This tutorial is really helpful, I am a Wordpress noob and I have destroyed my template quite a few times, at least I do some kind of back up before getting into real trouble. I use a free theme and I would like to change some aspects of it I’m sure that using your tips will help me to overcome my worries when doing modifications. I will be checking Web developer by the way, seems like a nice ad on.
May 31st, 2008 at 11:50 am
I’m bookmarking this post for later use. Great source of information.
June 2nd, 2008 at 12:15 am
Case
I am a gutless worm when it comes to WP themes. Just the other day my blog went AWOL because it turned out the theme was outdated. Fortunately, I could get Craig Desorcy to load a new theme and tweak it. all I did was create the new header graphic. Now, i’ll go and hang my head in shame.
June 3rd, 2008 at 1:56 pm
I would recommend firebug for this, since it can change the style of the webpage live. Just search it on google.
June 4th, 2008 at 4:37 pm
I must say that you have always do a backup copy. I have tried to tweak my template few times and I managed to crash my database just by making some very little changes to home.php. Sure, css is not harmful but still you have to be very careful.
June 16th, 2008 at 6:17 pm
James Brausch has created a new program that will help gather more business for your website. The program, Glyphius, takes the google headline you create for your website and scores it against similar websites based on successfulness. After the initial scoring, you can then change your headline to make it as successful as possible. Glyphius will then score your headline again against your competitors. This is truly and amazing product.
June 17th, 2008 at 3:41 am
Thanks for all the comments guys. Most appreciated.
@Sherri
If you want to learn more about CSS, there’s a tutorial available at Cascading Style Sheets (CSS) Tutorial
@Kevin
Good ol’ Graig. You’re lucky to have him as a friend!
June 18th, 2008 at 2:19 am
I came across this in google search as I badly wanted to tweak my theme and this post was most informative and helpful.
thanks