Guest User

mySQL query for getting recent featured images

a guest
Jan 14th, 2011
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $attachment_data_list = $wpdb->get_results( $sql );
  2. if ( $attachment_data_list ) {
  3.     foreach ( $attachment_data_list as $attachment_data ) {
  4.         //echo $attachment_data->
  5.         echo '<img src="/photos/wp-content/uploads/';
  6.         echo substr($attachment_data->upload_relative_path,0,-4);
  7.         echo '-88x88.jpg" width="88px" height="88px" class="awesome-thumbnail"/>';
  8.     }
  9. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.