Archive for June, 2011

Hiding Sidebar On Certain Page In WordPress

I have been working on a site the past few weeks and ran in to a little bit of a problem that I am sure lots of us had had before.

I am using WordPress and have designed every thing and set up all my sidebars just the way I want them and just at the end of the project the client

says to me that they want a few pages to be shown with out the sidebars. . . . So I did a little searching and this is by far the best way I have found to do this.

 

STEP 1:

In your theme folder make a file called

page-wide.php

STEP 2:

At the top of the file add this -

<?php
/*
Template Name: Wide Page
*/
?>

STEP 3:

Now add in all the code from your “page.php” under that

STEP 4:

Remove the side bar code and give the containing div a extra class or change the id, I just added “wide” to it.

and save the file.

 

STEP 5: Go to the page in the admin panel that needed the code removed and you will see there is a extra “Page Attribute” called “Template

Template Wide View

Template Wide View

 

Here you will be able to pick the new “wide page”  Template and have just that page go off of the new code.

Pick “wide page” and save.

 

That is all there is to it, now I have to do a few things for the css but all in all it saved a lot of time and this is something I will be working in to more themes that I build. :)

 

The key here is this page of code,

 

<?php
/*
Template Name: Wide Page
*/
?>

I also made a file called page-small.php and added this to the top.

<?php
/*
Template Name: Small Page
*/
?>


and was able to have a 3rd page to work with. :)

 

Well I hope this helps out others just as it has helped me out and have a great time making fun sites!

James Riter

The Cop That Changed The Way I Drive

So the other day I was driving like myself going down the 15 in Vegas. . . . This means I was going a little fast and being a bit of an ass. >_>  And that s when it happened!! Some big ass truck got rite up on my ass and well I had no idea what to think!!  I mean its not often someone catches up to me. lol   But after what seemed like a long time the red and blue light came on. . :(

 

I was sure I was going to get a ticket and what would of been a big fine…..

 

So the cop came to the passenger side and had my girlfriend and kid role down there windows. . .

On a side note: My kid looked really cute sitting there with his headphones on!  :)

 

Then he pointed to me and told me to get out of the car, as I got to the back of the car he started out by saying “How would you like me to take you to jail rite now?” and my heart fell to the ground.

 

After that this cop talked to me like no other cop has in m life .(Ive had to talk to a few) He talked to me as if he was a father, as if he really did care and most of all like he was upset that me as a human would drive that way.   It was easy to tell he was upset and to tell the truth he had every rite to be.

He went on about how I was putting my kid in danger, my *wife* (This was not the time to correct someone) in danger and could kill someone else mother.  But again he was not just yelling to yell!!  He was coming across as a man that really did care and that kind of made me think.

 

At the end of it all the looks me in the eyes and tells me “I better never see you driving like that again!” and I sure hope he does not. He did not check my driver license or ask my name.

 

Well I still drive a little more aggressive than others I can   say I have slowed a lot and most of all would like the chance to thank him!

He could of put me in jail or he could of given me a ticket, but he showed that he really did care and that is something you do not see a lot of.

 

Return top