When boiling potatoes, I like to use the leftover water for soups, sauces, etc. Does anyone else use potato water, and if so, how long can it be stored in the refrigerator? I am wondering if it has a "shelf life" similar to homemade stock. 


Question: get_permalink to attachment not working
Answer: Final version

&lt;?php

      $args = array(
   'post_type' =&gt; 'attachment',
   'numberposts' =&gt; 12,
   'post_status' =&gt; null
  );

  $attachments = get_posts( $args );
     if ( $attachments ) {
        foreach ( $attachments as $attachment ) {
           $url = get_permalink( $attachment-&gt;ID );
          echo '&lt;li&gt;&lt;a href="'.strstr($url, '/attachment', true).'"&gt;';
           echo wp_get_attachment_image( $attachment-&gt;ID, array('100', '100') );
          echo '&lt;/a&gt;&lt;/li&gt;';       
          }
     }

?&gt;


where /attachment is everything NOT needed in the URL.