SHARE
TWEET

latest posts

mrsteveita May 28th, 2014 213 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         <ul class="blocks-holder">
  2. <?php
  3.         $query="SELECT post_author, post_title, post_content FROM wp_posts WHERE post_status='publish' AND post_type='post'";
  4.         $res=mysql_query($query);
  5.        
  6.         if($res && mysql_num_rows($res)>0){
  7.                 while($row=mysql_fetch_assoc($res)){
  8.                 $id=$row['id']."";
  9.                 $title=$row['post_title']."";
  10.                 $date=$row['post_date']."";
  11.                 $firstimg=$row['post_firstimg']."";
  12.                 ?>
  13.                 <li class="block">
  14.                         <div class="block-ribbon">
  15.                                 <div class="left">
  16.                                         <div class="block-title"><a href='blog/?p=<?php echo $id; ?>'><?php echo $title; ?></a></div>
  17.                                         <div class="block-date"><?php echo $date; ?></div>
  18.                                 </div>
  19.                                 <div class="right"></div>
  20.                         </div>
  21.                         <a href='blog/?p=<?php echo $id; ?>'><img src='<?php echo $firstimg; ?>' alt="Thumb" class="thumb" title="Thumbnail" width="300" height="157" /></a>
  22.                 </li>
  23.                 <?php }
  24.         } else {
  25.                 echo "Nessun Articolo";
  26.         }
  27. ?>
  28. </ul>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top