Posts Tagged ‘styles’

Using the WordPress body_class Function to Apply Custom CSS Based on Conditions

Wednesday, April 28th, 2010

Yesterday I spent a few hours writing a PHP script for a commenter that would generate an HTML element based on the condition that the visitor was either on the home page or not.  The idea was to create a custom background only for the frontpage with a div layer that wrapped around everything within the body tag.

After I completed the script I thought about using a conditional statement to replace the body tag (with one that had its own ID) rather than outputting a div tag in two places (in header.php and footer.php). I took a look at the documentation for the template tag WordPress 2.8+ blogs use in place of the body tag (<?php body_class( $class ); ?>). What followed was a facepalm of epic proportions.

It looked something like this:

face palm Using the WordPress body class Function to Apply Custom CSS Based on Conditions

Except for the fact that I am not a fat guy, my desk was not clean and my forehead was dripping with blood afterwards.

(more…)

Yahoo to release a new style guide for web writing

Thursday, April 8th, 2010

If it’s one thing serious bloggers need, it’s an objective style book like what print publications have in The Associated Press Stylebook or The Chicago Manual of Style.

Is website one word or two? Is internet capitalized? Is it re-tweet or retweet?

(more…)

How to change the fonts on your WordPress blog theme

Monday, March 8th, 2010

Do the fonts on your free WordPress theme cause you to puke in your mouth a little every time you look at them? Or maybe you are just tired of looking at the same fonts and need something new. In either case, this guide is for you.

The truth is, fonts are like hats. Some hats are very ugly hats.

a very ugly hat How to change the fonts on your WordPress blog theme

So let’s go hat shopping!

(more…)

Using Firebug to experiment with styles on your WordPress blog before making permanent changes

Saturday, February 20th, 2010

firebug 150x150 Using Firebug to experiment with styles on your WordPress blog before making permanent changesFor many WordPress users who are self-hosted, changing the styles on a theme can lead to a great deal of frustration. After all, not everyone is proficient in CSS. And some bloggers, who have a basic grasp of CSS, don’t necessarily know where to find the particular code snippets they are looking for to alter styles. Even expert coders — without assistance from a program — can have a great deal of difficulty finding the styles for elements in the theme that they want to change. That’s just 3 reasons why you should install the fabulous Firebug add-on for Firefox.

(more…)