I have following code

    &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 ) {
           echo '&lt;li&gt;&lt;a href="'.get_permalink( $attachment-&gt;ID ).'"&gt;';
           echo wp_get_attachment_image( $attachment-&gt;ID, array('100', '100') );
          echo '&lt;/a&gt;&lt;/li&gt;';
          }
     }

?&gt;


The point of this script is to show last added 12 photos (thumbs of it). And this works perfect. But I want to add second funcionality - link to the page where it comes from (usually native gallery embed into post/page)

The problem is that in this case the link is corrupted. It always links to the very first post. What I am doing wrong?


Question: Minimal Polynomial of a scalar multiple of a Matrix
Answer: Let $f(x)$ be a polynomial such that $f(cA) = 0$. Then $g(x) = f(cx)$ is a polynomial such that $g(A) = 0$, and hence, by definition of the minimal polynomial, $g(x)$ is divisible by $M_A(x)$, i.e., $g(x) = q(x)M_A(x)$ for some polynomial $q(x)$. What does this, then, imply for $f(x) = g(x/c)$?