likes=$wpdb->prefix."likes"; $wpdb->post=$wpdb->prefix."posts"; //define the arrays to hold story info $ms_post = array(); $ms_size = array(); $ms_imag = array(); $ms_desc = array(); $ms_fhgt = array(); //fill out the story info //The Hangover Incident array_push($ms_post, 2699); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/07/BeFunky_Grunge_91.jpg"); array_push($ms_desc, "Getting drunk is stupid, but being hung over is worse... especially when you're girlfriend makes you attend a family affair."); array_push($ms_fhgt, 95); //Man Camping array_push($ms_post, 2654); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/06/BeFunky_PopArt_4bikini.jpg"); array_push($ms_desc, "When you and three of your friends meet four topless girls at a campsite, it really sucks to be the one with a girlfriend back home..."); array_push($ms_fhgt, 63); //The Best Revenge array_push($ms_post, 2613); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/05/BeFunky_Lomoart_12.jpg"); array_push($ms_desc, "They say that the best revenge is living well... I can do you one better."); array_push($ms_fhgt, 77); //Girl's Night array_push($ms_post, 2570); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/03/BeFunky_Inkify_2.jpg"); array_push($ms_desc, "There's a reason guy's don't attend girl's night... and this is the story of why."); array_push($ms_fhgt, 60); //The High School Party array_push($ms_post, 2461); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/03/BeFunky_hsparty12.jpg"); array_push($ms_desc, "Being drunk and recently rejected isn't an excuse to hang around a high school party that you accidentally crashed... but it doesn't hurt."); array_push($ms_fhgt, 64); //Don't Meddle array_push($ms_post, 2045); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/01/mancovereyes_PopArt_13.jpg"); array_push($ms_desc, 'A constantly fighting couple, a "just friends" date to a wedding, and a lot of miscommunication... what could go wrong?'); array_push($ms_fhgt, 84); //The McDonalds Playland Birthday array_push($ms_post, 2044); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/01/mcdonalds-balls_PopArt_4.jpg"); array_push($ms_desc, "When you're young and inexperienced all it takes to score is booze, a wise friend, and a romp in the McDonald's Playland™ on your birthday with a girl who already has a boyfriend."); array_push($ms_fhgt, 68); //My First Time in a Vagina array_push($ms_post, 2040); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/01/brokenlamp_Grunge_12.jpg"); array_push($ms_desc, "It involves stairs..."); array_push($ms_fhgt, 60); //Too Much Girl array_push($ms_post, 2034); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/01/toomuch1.jpg"); array_push($ms_desc, "Of course it's hard for a guy to admit that his hot, nymphomaniac girlfriend may not have all her marbles, but consider yourself warned: Sometimes it's better to abandon ship before you go down with it."); array_push($ms_fhgt, 70); //My First and Only Rave array_push($ms_post, 1954); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2010/08/ravepartybf.jpg"); array_push($ms_desc, "Hanging out at a rave, sober, with the Make Out Bandit and my friend's 18 year old sister... yeah, this was such a greeeeeeat idea."); array_push($ms_fhgt, 58); //The First Date Disaster array_push($ms_post, 1685); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2010/08/firstdatedisaster.jpg"); array_push($ms_desc, "It begins as good as any first date can, yet ends as poorly as any can. In this case, I couldn't escape the inevitable winds of destiny... so to speak."); array_push($ms_fhgt, 51); //The Rockstar Button array_push($ms_post, 1525); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/01/rockstar1gf.jpg"); array_push($ms_desc, "With great power comes great responsibility. Or, if you're drunk, great irresponsibility. This is the story of how power and alcohol lost me the girl, but gave me one of the craziest nights of my life that I will always remember. Well... sort of remember..."); array_push($ms_fhgt, 80); //The Night I Fought Crime and Saved a Girl array_push($ms_post, 1161); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2012/01/newyears2_Watercolor_1.jpg"); array_push($ms_desc, "This is the story of unexpected chivalry, a bizarre bus ride, and a special New Year's eve."); array_push($ms_fhgt, 45); //The Bad Kind of Sleep Over array_push($ms_post, 1068); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/11/Sleep-Over.jpg"); array_push($ms_desc, "When you crash at a friend's place after a good party, just be warned: No good can come from sleeping beside your buddy's girlfriend. Especially when your buddy is also sleeping nearby."); array_push($ms_fhgt, 118); //Pissed array_push($ms_post, 860); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/10/donotdisturb4.jpg"); array_push($ms_desc, "Pissing is always a lot harder when you're about to explode, drunk as hell, and clad in a skin tight Spiderman costume. Just remember to keep your eye on the prize, don't get distracted, and if things go sideways, don't panic. It's better to keep your cool than to get pissed."); array_push($ms_fhgt, 122); //The Party with Penis, Pussy, and Puke array_push($ms_post, 469); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/09/The-Party-Alt-3.jpg"); array_push($ms_desc, "A summer party, a hot tub full of cute girls, an excessive amount of alcohol, and a lot of bad decisions. Ah, youth."); array_push($ms_fhgt, 100); //Sneaky, Naughty Sex array_push($ms_post, 466); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/09/Sneaky4.jpg"); array_push($ms_desc, "There's just something about alcohol, boredom, and Truth or Dare that always seems to lead to trouble."); array_push($ms_fhgt, 105); //The Rival array_push($ms_post, 462); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/09/TheRival.jpg"); array_push($ms_desc, "Not all enemies are mortal men. This is the case of a dastardly pink nemesis known only as Mr. Big."); array_push($ms_fhgt, 93); //The Masturbation Gambit array_push($ms_post, 459); array_push($ms_size, h4); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/09/The-Masturbation-Gambit.jpg"); array_push($ms_desc, "It's a last ditch effort, employed by guys only in the direst of circumstances: masturbating."); array_push($ms_fhgt, 43); //Sloppy Girl array_push($ms_post, 456); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/09/SloppyGirl.jpg"); array_push($ms_desc, "When girls drink too much and invariably become sloppy and inappropriate, it usually falls to us guys to watch out for them. Of course, it helps if you actually know the girl you're taking care of."); array_push($ms_fhgt, 68); //The Best Friend array_push($ms_post, 452); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/09/BestFriend.jpg"); array_push($ms_desc, "The quickest way to destroy a man's ego is to tell him how great he is, and explain how you can't believe that he's still single... and then flatly deny any sexual interest in him."); array_push($ms_fhgt, 68); //The Blond Goddess array_push($ms_post, 444); array_push($ms_size, h3); array_push($ms_imag, "http://jdsmanstories.net/wp-content/uploads/2009/09/Blond-Goddess3.jpg"); array_push($ms_desc, "Stuck at the airport, an uncharacteristically bold flirtation, and the hottest girl I've ever been with. Needless to say, this is the story of the worst sexual experience of my life."); array_push($ms_fhgt, 120); //start the table echo ""; //add in the entries, recovering likes and comments counts foreach($ms_post as $idx => $spost) { //select the current post global $post; $post = get_post($spost); setup_postdata($post); //new row echo ""; //new cell, image echo ""; //new cell, title and description table echo ""; echo ""; } echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo ""; echo ""; $postid = get_the_ID(); $sql="SELECT post_id,p.post_title AS title,count(post_id) AS num FROM $wpdb->likes,$wpdb->posts p WHERE p.id=post_id AND post_id=$postid GROUP BY post_id LIMIT 1"; $results=$wpdb->get_results($sql); foreach($results as $row){ $comment_count=wp_count_comments($postid)->approved; if($comment_count < 0)$comment_count = 0; echo ""; echo ""; echo ""; echo ""; } echo ""; echo "
"; echo "<$ms_size[$idx]>".get_the_title().""; echo "
$row->num
"; echo "
"; echo "
$ms_desc[$idx]
"; echo "
"; echo "
"; ?>