Using multiple stylesheets with WordPress

March 31, 2009 2 comments

It’s rather common practice to use more than one stylesheet within any type of web design. So with a recent project I managed to create 2 stylesheets that both had different layout properties. One CSS layout was for the index / front page and a second CSS stylesheet was used for pages within WordPress. So to keep in line with web standards, separating design from content, I found a very simple way to use a php if … else statement along with the WordPress conditional tag to achieve this task.

Here’s the code I used:


<?php if ( is_page() ) { ?>
	<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/page.css" type="text/css" media="screen" />
<?php } else { ?>
	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"  type="text/css" media="screen" />
<?php } ?>

So a simple explanation of this is to start with the “if” statment. Our “if” statement starts by asking is this a WordPress page (using the conditional tag is_page) and if it is to load the page.css stylesheet. But if it is not a page (else statement) then load the default style.css.

You may also have noticed that within this code I used the bloginfo() template tag. This can be used within a template file to gather information about your blog. I used the bloginfo() tag within my header.php file. Now you can also use the get_bloginfo() template tag to pull your blog information into a page outside of a template file.

So now go and have fun templating your WordPress blog!

Google, the silent giant.

March 25, 2009 No comments yet

Or maybe not so silent, rather it could just be me not realizing how HUGE this company really is. I was setting up a Feedburner (which if you don’t know is a great RSS extender service) account the other day and I happened to notice that they had been acquired by Google. Where have I been? It may have happened sometime ago, but that was the first I had seen of it. So I then began to think just how many services / companies Google currently has under it’s umbrella.

As far as products, simply check out their website and you’ll soon discover that you can nearly do everything straight from Google.com! For example, iGoogle.com, what better home page can you think of? It’s got everything and it’s completely customizable. It’s the best in my opinion.

Here is the Wikipedia list of acquisitions from Google.

http://en.wikipedia.org/wiki/List_of_acquisitions_made_by_Google

Google Summer of Code 2009

I so wish I could do this (but I’m not a student). The Summer of Code is going down again real soon. I probably wouldn’t even have the time to mess with anything. I really want to try and get some nice themes out this summer and work on a couple of plugins that I have been kicking around.

But if you’re a student and want to spend your Summer coding – check this out!

Oh Google!

How I heart thee!

My first Halo 3 machinima!

March 24, 2009 No comments yet

So after months and months of talking about doing it, we finally did it. I, along with 3 other buddies, made our first Halo 3 machinima (applause). Yeah, I know it may be so “childish” but man it’s fun and we (for the most part) had a lot of fun making it. I think in this pilot episode we really learned what it takes to create a working machinima and now we respect those a little bit more who work so hard to deliver quality machinimas time after time (Red vs Blue, Arby ‘n’ the Chief). So here it is, our first “production”.

[youtube]http://www.youtube.com/watch?v=D532bRgjzds[/youtube]

The Wrestler, good movie!

March 24, 2009 No comments yet

So I saw “The Wrestler” last night and I really enjoyed it. It stars Mickey Rourke as a retired professional wrestler. It follows his character “The Ram” some 20 years after his haydays as a mainstream figure. But he’s not washed up just yet, he performs at small shows and signs autographs at the local Legion. I won’t give away too much more if you are one who has yet to see the movie. In my opinion it was really good and if I had never heard of Mickey Rourke before, I would have thought that he was really Randy “The Ram” Robinson. He did an amazing job in this film! Along side him was the actress Marisa Tomei and honestly, I was shocked at just how “much” of her you see in this movie. She looks great and did a great job!

AIG WTF?

March 18, 2009 No comments yet

I’m already getting tired about the news relating to AIG.

What’s funny is I can see no difference between what AIG is doing and what Bernard Madoff did. Bernard Madoff tricked people out of millions of dollars. AIG tricked the taxpayers (and the President) out of millions of dollars. Like looking in a mirror. *shrugs*

I think one Congress person made a great comment. Why give someone a bonus if they are the ones responsible for helping to land the company in the trouble they are in. Thanks for canning our company, here’s $4.62 million dollars for your efforts! WHATEVER!!!

Plus it appears that AIG with these contracts made no clauses to protect themselves? Did these “contracts” come into play before the bailout money or after? So even without the bailout money, AIG would STILL have to pay the bonuses? Sinking the company even further? Makes no sense. Even as I try to explain this to myself, I can’t understand it.

In my opinion I think whomever took these “bonuses” from AIG are no different in their actions, than Bernard Madoff.

So at the end of the day AIG laughs while on their way to the banks and Bernard Madoff goes back to his penthouse, while we all suffer.