How can I hide previous_image_link() on first attachment page?
Use the string function instead, and print it only if you get something: $previous = adjacent_image_link(true, ‘thumbnail’ ); if ( ! empty ( $previous ) ) print ‘before’ . $previous . ‘after’;