WordPress, Caching, and Compression

ApacheAfter reading this article dealing with “bulletproofing” a blog, I started looking at my own blog. Over the past few months as more and more great plugins come out that I depend on now, my page load times had started suffering. A load time of 14 seconds on a T1 was not unheard of, and it could get as bad as 20 seconds on some days. The article by Eric Amundson had a link to a couple of Firefox plugins that looked promising in helping diagnose ailing websites. One is Page Speed from Google. The other from Yahoo! called YSlow.

Continue reading

Posted in Internet, tech, wordpress | Tagged , , , , | Comments Off on WordPress, Caching, and Compression

Comment Problem Fixed

If anyone has tried to comment and couldn’t the problem is now fixed. While cleaning my database I accidentally deleted a needed field in the comment table. No big deal I readded it and now up and going again. So if you had a question or comment you should be able to post it now. Sorry for any inconvience.

Posted in Aside | Comments Off on Comment Problem Fixed

WordPress Theme Dev Tip – Dynamic Stylesheets

WordPressA dynamic stylesheet using php is a powerful thing, when accompanied by a user options page it can really make a theme. I’ve recently done this to my Techozoic theme, and I’m going to share how this works and some time saving tips.

First you’ll want some way of letting the theme user choose what will change in the stylesheet, I explain how to do this with a theme options framework here. After you’ve got all the options set the way you want you need some way of getting those into your theme. At first I was just using <style></style> tags in the header of the theme, while this works it just isn’t an efficient way of writing a theme. What I wanted to do was have an external file that changed with the options but that could also be cached by the web browser, to improve performance, save bandwidth and overall have a better written theme.

Now if your using a framework similar to mine or your using mine then you know you have to pull some info from the WordPress database to fill in your variables from your option page. This posed the biggest problem because since this was an external page none of the WordPress functions would work. To get around this in the first version I just loaded the wp-config.php and wp-load.php files in the top of the file. This is bad practice because WordPress site owners can move these files around now and there is now way to know where to load these from. So I spotted the solution from another theme developer. Making an array of all the option values then using php GET variable on the external stylesheet. Now onto the actual code.

Continue reading

Posted in tips, wordpress | Tagged , , | 6 Comments

Dynamic Stylesheets using PHP

CSSRecently while doing some work on my theme for WordPress I came across a very helpful idea. Using PHP in a stylesheet to make it more dynamic. The basic idea is to use PHP variables and define certain elements that repeat in various places such as a color code to make it easily changeable by only having to change one line instead of searching for and replacing multiple times. Other examples are fonts, images, widths, even whole sections of code could be shown or hidden with the use of variables and an if statement.

Continue reading

Posted in Internet, tips | Tagged , , , | 7 Comments

Firefox 4 Mockups

firefox-logoMozilla has starting thinking about Firefox 4 and with these mock ups have starting throwing ideas around. There are two different versions as of now, tabs below address bar and one with the tabs above the address bar. Another thing their showing off is a combo refresh/go/stop button, where depending on what’s being done in the browser the button changes.
firefox-mockup

Posted in Internet | Tagged , , | Comments Off on Firefox 4 Mockups