High Five

Very nice!


(1 votes, average: 5 out of 5) Loading ... Loading ... Comments

Using WP_Query to create custom queries

while reading my usual RSS feeds I stumbled upon this article on displaying your latest post.

It took me eye as I have been busy implementing similar things for my upcoming website, except I have been using WordPress’ WP_Query function to achieve the same results.

Basically WP_Query is used to create a seperate mini-loop outside of your main loop.  It has many advantages over using a custom SQL query like

  1. You don’t need to know proper SQL syntax
  2. It’s a core WordPress function, so if the database structure changes it will still work
  3. is more concise and uses less code
  4. highly customisable in that you can easy modify the post parameters (specify category, author, sort order, etc.)

The below is just a simple demo the grabs a link to the latest post.  It shows how easy WP_Query really is to use.


< ?php

$my_query = new WP_Query('showposts=1');
while ($my_query->have_posts()) : $my_query->the_post();
echo '<a href="' . get_permalink() . '">' . the_title('','',FALSE) . '</a>';
endwhile;

?>

(2 votes, average: 5 out of 5) Loading ... Loading ... Comments

Almost Transformers

Whitegoods in disguise


(3 votes, average: 5 out of 5) Loading ... Loading ... Comments

French Kangaroo


(1 votes, average: 5 out of 5) Loading ... Loading ... Comments

The Apocalypse has cometh

The internet has gone down, basically the same thing.


(Rate This Post) Loading ... Loading ... Comment

Costa Rican SWAT Team

Number one in the world.


(1 votes, average: 5 out of 5) Loading ... Loading ... Comments

A Flat Stomach Joke

A little boy walks into his parents’ room to see his mum on top of his dad bouncing up and down.
The mum sees her son and quickly dismounts, worried about what her son has seen.
She dresses quickly and goes to find him.

The son sees his mom and asks, ‘What were you and Dad doing?’
The mother replies, ‘Well, you know your dad has a big tummy and sometimes I have to get on top of it and help flatten it.’

‘Your wasting your time,’ said the boy.
‘Why is that?’ the mom asked puzzled.

‘Well when you go shopping the lady next door comes over and gets on her knees and blows it right back up.’


(1 votes, average: 5 out of 5) Loading ... Loading ... Comments

The Tiffany Bracelet Joke

Tiffany BraceletA lady walks into Tiffany’s. She browses around, spots a beautiful diamond bracelet and walks over to inspect it. As she bends over to look more closely she inadvertently breaks wind.

Very embarrassed, she looks around nervously to see if anyone has noticed her little accident and prays that a sales person doesn’t pop up right now.

As she turns around, her worst nightmare materialises in the form of

a salesman standing right behind her.

Cool as a cucumber and displaying complete professionalism,

the salesman greets the lady with, ‘Good day, Madam.

How may we help you today?’

Very uncomfortably, but hoping that the salesman

may just not have been there at the time of her little

‘accident’, she asks, ‘Sir, what is the price of this lovely bracelet?’

He answers, ‘Madam, if you farted just looking at it,

you’re going to shit yourself when I tell you the price.’


(Rate This Post) Loading ... Loading ... Comment

A Blonde Nurse Visits a Bank Joke

A very tired nurse walks into a bank, Totally exhausted after an 18-hour shift.
Preparing to write a check, She pulls a rectal thermometer out of her purse And tries to write with it.
When she realises her mistake, She looks at the flabbergasted teller, And without missing a beat, she says

“Well, that’s great….that’s just great….

Some asshole’s got my pen!”


(2 votes, average: 5 out of 5) Loading ... Loading ... Comments

Golf Club Sign

  1. Back straight, knees apart and feet a shoulder width apart
  2. Form a loose grip
  3. Keep your head down
  4. Avoid a quick back swing
  5. Stay out of the water
  6. Try not to hit anyone
  7. If you’re taking too long, let others go ahead of you
  8. Don’t stand directly in front of others
  9. Quiet please… While others are preparing
  10. Don’t take extra strokes

Well Done.

Now… Flush the urinal, go outside, and tee off.


(1 votes, average: 4 out of 5) Loading ... Loading ... Comments



Subscription

RSS

Email:

Tag Cloud

7 11 ACA Accident Accidents Advertisements Airport Americans Animals Army article Australian Babies Bacon Badminton Balloons Balls Banana Banks Banksy Basketball batman BBQ Beer bike Bikes Blender Blonde Blondes Bollywood Bono Borat Boss Bowling Boxing Britney Spears Bush Caratoons Cars Cartoons Cats Celine Dion Chair Charities Chaser Chat Cheerleader Cheese Chicken Children Christmas Chuck Norris Cinder Blocks Coffee Comedy Communication Computer Computer Games Computers Cooking Cops Costumes Cows Crazy Criminals Crocodiles Crooks Crows Cycling Dacning Dancing Danger Mouse Death Dinosaurs Disco Doctor Dogs Drinking Drugs Drunk Election Ellen Emo Exercise Explosions Eye Chart facebook Faces Fail Family Guy Fancy Dress Farmer Farting Feminism Fight Fights Finland Fire Firefighters Fireworks Food Football Gameshow Gameshows Geek german Glowsticks God Golf Golf Marriage Google Goonies Goths Graffiti Greek Grillz guitar hero Guns Gym Hancock Hands Hecklers heroes Hitler Hospital House Hunting Husbands Hyphenation Ideol Idiots Idol IKEA Illness Images Indian Infidelity Infomercial Internet Irish Jackass Jackie Chan Japan Jeans Jesus Jewellery Jokes Jokes Lawyers Juggling Karaoke Karate Kasou Kids Kobe Bryant Kwik E Mart lego Letters Life Lionel Richie lolcat Lollies LOTR Magic Management Mario Marriage Marrige Maths Meat Men Mexican Michael Jackson Midget Mime Mixtaping Mobile Phones Models Monkeys Monster Trucks Moonwalk Movies Muppets Muscles Music Music Video Musical Musicians Nerd Nerds New York New Zealand News Nintendo nurse Office old men Old People Oldies Origami Pancakes Paris Hilton Parkour Parody Party Pets Photoes Pi Pickles Pictures Pictures Cars Pizza Plane Plugin PMS Police Politics Pool Powerpoint Prank Pranks Preaching Priest Prison Quiz Rainbow Rap Rape Rapping Real Stories Rednecks Reggae Rick Rolld Riding Robot Russia Salad Fingers Science Sesame Street Sewing Sex sheep Shopping Simpsons Singing skateboard Skating skinny dipping Skunk Slide Slow Motion Smoking Soccer social networking south park Spelling Sport Sports Squirrel Stand up Star Trek Star Wars Stock Market Stunts Stupidity Superman SWAT swearing Sweded swimming Talent Show Tattoo Tech Support Television Terrorists Thiefs TMNT to the face Toilet Tools Trains Transformers Unicorn USA Vegetables video games Videos Vidoes Wall Washing WaterSlide Webcam Weird Weird Al Wife Wifes Willy Wonka Windows Women WordPress Workout WP LightForm Wrestling Yoda Zorba

Top Commenters

  • Alex (44)
  • little duck (22)
  • jfed (11)
  • keiser (8)
  • Tom @ halloween witch costume (7)
  • David Potter (7)
  • greg @ skunk costume (7)
  • Rochelle @ Fairy Princess Costumes (6)
  • doug @ Kids Vampire Costumes (6)
  • Terry @ Movie Character Costumes (5)